/[webpac]/trunk2/out/js/usage.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/usage.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 461 by dpavlin, Wed Sep 22 18:00:21 2004 UTC
# Line 58  function findDivHelper(n, id) Line 58  function findDivHelper(n, id)
58    {    {
59      if((m.nodeType == 1) &&      if((m.nodeType == 1) &&
60         (m.tagName.toLowerCase() == "div") &&         (m.tagName.toLowerCase() == "div") &&
61           m.getAttribute("id") &&
62         (m.getAttribute("id").toLowerCase() == id.toLowerCase() ))         (m.getAttribute("id").toLowerCase() == id.toLowerCase() ))
63      {      {
64        return m;        return m;
# Line 85  function printResults(result) Line 86  function printResults(result)
86    debug("printResults("+result.length+")");    debug("printResults("+result.length+")");
87    
88    var d = findDiv("results");    var d = findDiv("results");
89      var header;
90    
91    // Null result output    // Null result output
92    if(result.length < 1)    if(result.length < 1)
93    {    {
94      var header = (d.getElementsByTagName("h2"))[0].firstChild;      header = (d.getElementsByTagName("h2"))[0].firstChild;
95      header.replaceData(0, 14, "Nothing Found ");      try {
96          header.replaceData(0, 14, "Nothing Found ");
97        } catch(e) {}
98    
99      if(search_err != "")      if(search_err != "")
100      {      {
# Line 110  function printResults(result) Line 114  function printResults(result)
114    {    {
115      var e = document.createElement("font");      var e = document.createElement("font");
116    
     e.setAttribute("color","blue");  
     e.setAttribute("size","+1");  
     e.appendChild(document.createTextNode(result[i].title));  
     d.appendChild(e);  
     d.appendChild(document.createTextNode(" "));  
     d.appendChild(document.createElement("br"));  
   
117      e = document.createElement("a");      e = document.createElement("a");
118      e.setAttribute("href",result[i].link);      e.setAttribute("href",result[i].link+location.search);
119      e.setAttribute("target","_blank");  //    e.setAttribute("target","_blank");
120      e.appendChild(document.createTextNode(result[i].link));      e.appendChild(document.createTextNode(result[i].title));
121      d.appendChild(e);      d.appendChild(e);
122      d.appendChild(document.createTextNode(" "));      d.appendChild(document.createTextNode(" "));
123    
124      e = document.createElement("font");      e = document.createElement("font");
125      e.setAttribute("color","green");      e.setAttribute("color","gray");
126      e.appendChild(document.createTextNode("["+result[i].frequency+"]"));      e.appendChild(document.createTextNode("["+result[i].frequency+"]"));
127      d.appendChild(e);      d.appendChild(e);
128      d.appendChild(document.createElement("br"));      d.appendChild(document.createElement("br"));
# Line 133  function printResults(result) Line 130  function printResults(result)
130    }    }
131    
132    // Change header    // Change header
133    var header = (d.getElementsByTagName("h2"))[0].firstChild;    header = (d.getElementsByTagName("h2"))[0].firstChild;
134    
135    header.replaceData(0, 14, "Search Results");    try {
136        header.replaceData(0, 14, "Search Results");
137      } catch(e) {}
138    
139  }  }

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

  ViewVC Help
Powered by ViewVC 1.1.26