]> matita.cs.unibo.it Git - helm.git/blobdiff - matitaB/matita/matitaweb.js
Changed behavior in matitaweb.js, function retrieveFile (it is now
[helm.git] / matitaB / matita / matitaweb.js
index 07dbb06f68c7ce6717b442fbc1c716551caff28f..86481a1ed15417a77dc3cdbc732cc02d17ceb7ee 100644 (file)
@@ -178,7 +178,8 @@ function debug(txt)
         // internet explorer (v.9) doesn't work with innerHTML
        // but google chrome's innerText is, in a sense, "write only"
        // what should we do?
-        logarea.innerText = txt + "\n" + logarea.innerText;
+        // logarea.innerText = txt + "\n" + logarea.innerText;
+        logarea.innerHTML = txt + "\n" + logarea.innerHTML;
 }
 
 function listhd(l)
@@ -626,8 +627,11 @@ function retrieveFile(thefile)
                if (is_defined(xml)) {  
                        lockedbackup = ""
                        locked.innerHTML = lockedbackup;
-                       debug(xml.getElementsByTagName("file")[0].childNodes[0].nodeValue);
-                       unlocked.innerHTML = xml.getElementsByTagName("file")[0].childNodes[0].nodeValue;
+                        // code originally used in google chrome (problems with mozilla)
+                       // debug(xml.getElementsByTagName("file")[0].childNodes[0].nodeValue);
+                       // unlocked.innerHTML = xml.getElementsByTagName("file")[0].childNodes[0].nodeValue;
+                       debug(xml.childNodes[0].textContent);
+                       unlocked.innerHTML = xml.childNodes[0].textContent;
 
                } else {
                        debug("file open failed");