/[webpac]/trunk2/out/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 /trunk2/out/js/search.js

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

revision 391 by dpavlin, Wed Jul 21 16:45:47 2004 UTC revision 464 by dpavlin, Thu Sep 23 17:14:33 2004 UTC
# Line 81  function intersect_results(data) Line 81  function intersect_results(data)
81  */  */
82  function debug(msg)  function debug(msg)
83  {  {
84    return; // Disable debugging  //  return; // Disable debugging
85    
86    if(!debug.box)    var debug_div = element_id('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 148  function loadXML(url, handler, data, res Line 135  function loadXML(url, handler, data, res
135    
136    try    try
137    {    {
138        var xmldoc;
139      // Use the standard DOM Level 2 technique, if it is supported      // Use the standard DOM Level 2 technique, if it is supported
140      if (document.implementation && document.implementation.createDocument)      if (document.implementation && document.implementation.createDocument)
141      {      {
142       // Create a new Document object       // Create a new Document object
143        var xmldoc = document.implementation.createDocument("", "", null);        xmldoc = document.implementation.createDocument("", "", null);
144    
145        // Specify what should happen when it finishes loading        // Specify what should happen when it finishes loading
146        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 155  function loadXML(url, handler, data, res
155      // Something about not following standards once again      // Something about not following standards once again
156      else if (window.ActiveXObject)      else if (window.ActiveXObject)
157      {        {  
158        //var xmldoc = new ActiveXObject("MSXML2.DOMDocument");   // Create doc.        xmldoc = new ActiveXObject("Microsoft.XMLDOM");   // Create doc.
159        var xmldoc = new ActiveXObject("Microsoft.XMLDOM");   // Create doc.        if (! xmldoc) xmldoc = new ActiveXObject("MSXML2.DOMDocument");   // Create doc.
160        // Specify onload        // Specify onload
161        xmldoc.onreadystatechange = function()        xmldoc.onreadystatechange = function()
162        {                      {              

Legend:
Removed from v.391  
changed lines
  Added in v.464

  ViewVC Help
Powered by ViewVC 1.1.26