/[jsFind]/trunk/html/js/search.js
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/html/js/search.js

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17 by dpavlin, Tue Jul 20 17:08:06 2004 UTC revision 18 by dpavlin, Sun Oct 3 21:24:57 2004 UTC
# Line 83  function debug(msg) Line 83  function debug(msg)
83  {  {
84  //  return; // Disable debugging  //  return; // Disable debugging
85    
86    if(!debug.box)    var debug_div = document.getElementById('debug');
   {  
     debug.box = document.createElement("div");  
     debug.box.setAttribute("style",  
                            "background-color:white" +  
                            "font-family: monospace; " +  
                            "border: solid black 3px; "+  
                            "padding: 10px;");  
   
     document.body.appendChild(debug.box);  
     debug.box.innerHTML = "<h1 style='test-align:cent'>Debugging Output</h1>";  
   }  
87    
88    var p = document.createElement("p");    if (debug_div) debug_div.innerHTML += msg+"<br/>\n";
   p.appendChild(document.createTextNode(msg));  
   debug.box.appendChild(p);  
89  }  }
90    
91  //  //
# Line 133  function watchdog() Line 120  function watchdog()
120    watchdog_callback(new Array());    watchdog_callback(new Array());
121  }  }
122    
123    var xmldoc;
124    
125  // This function loads the XML document from the specified URL, and when  // This function loads the XML document from the specified URL, and when
126  // it is fully loaded, passes that document and the url to the specified  // it is fully loaded, passes that document and the url to the specified
127  // handler function.  This function works with any XML document  // handler function.  This function works with any XML document
# Line 152  function loadXML(url, handler, data, res Line 141  function loadXML(url, handler, data, res
141      if (document.implementation && document.implementation.createDocument)      if (document.implementation && document.implementation.createDocument)
142      {      {
143       // Create a new Document object       // Create a new Document object
144        var xmldoc = document.implementation.createDocument("", "", null);        xmldoc = document.implementation.createDocument("", "", null);
145    
146        // Specify what should happen when it finishes loading        // Specify what should happen when it finishes loading
147        xmldoc.onload = function() { handler(xmldoc, url, data, result_handler); }        xmldoc.onload = function() { handler(xmldoc, url, data, result_handler); }
# Line 167  function loadXML(url, handler, data, res Line 156  function loadXML(url, handler, data, res
156      // Something about not following standards once again      // Something about not following standards once again
157      else if (window.ActiveXObject)      else if (window.ActiveXObject)
158      {        {  
159        //var xmldoc = new ActiveXObject("MSXML2.DOMDocument");   // Create doc.        xmldoc = new ActiveXObject("Microsoft.XMLDOM");   // Create doc.
160        var xmldoc = new ActiveXObject("Microsoft.XMLDOM");   // Create doc.        if (! xmldoc) xmldoc = new ActiveXObject("MSXML2.DOMDocument");   // Create doc.
161        // Specify onload        // Specify onload
162        xmldoc.onreadystatechange = function()        xmldoc.onreadystatechange = function()
163        {                      {              

Legend:
Removed from v.17  
changed lines
  Added in v.18

  ViewVC Help
Powered by ViewVC 1.1.26