home *** CD-ROM | disk | FTP | other *** search
/ Reverse Code Engineering RCE CD +sandman 2000 / ReverseCodeEngineeringRceCdsandman2000.iso / RCE / Seeker / gr_serch.txt < prev    next >
Text File  |  2000-05-25  |  9KB  |  270 lines

  1. <HTML>
  2. <HEAD>
  3.    <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
  4.    <META NAME="GENERATOR" CONTENT="Mozilla/4.03 [de] (Win95; I) [Netscape]">
  5.    <TITLE>Search Our Site with the JavaScript Search Engine</TITLE>
  6. <!-- This HTML document was produced by InterAd, Inc. -->
  7. <!-- ⌐1996 WebNation, Inc. -->
  8. <!-- WebNation e-mail: concierge@webnation.com    WebNation phone: 602-990-3938 -->
  9. <SCRIPT language="javascript">
  10.  
  11. /* JavaScript Search Engine*/
  12.  
  13. /*JavaScript Loan Calculator
  14.  
  15.  
  16.      by Kristy Welsh
  17.  
  18.  e-mail: kristy@web-nation.com
  19.      based on a demo by Netscape Communications, Inc. 
  20.     steal it if you must, but please give me credit!!
  21.     Copyright 1996 Kristy Welsh and WebNation, Inc. Written (June.12.96)                        
  22. */
  23.  
  24.  
  25.     var key = "";
  26.  
  27.     
  28.  
  29. // Functions for links object creation and manipulation
  30.  
  31.     function makeEntry (){
  32.         this.Date = "";
  33.         this.Name="";
  34.         this.URL = "";
  35.         this.Desc = "";
  36.         this.Category = "";
  37.         return this;
  38.     }
  39.  
  40.  function makeArray(n) {
  41.  
  42.         this.length = n;
  43.         for (var k = 1; k <= n; k++) {
  44.  
  45.                 this[k] = "";
  46.         }
  47.         return this;
  48.     }        
  49.  
  50.  
  51.  
  52.     function makeLinks(size) {
  53.                 this.length = size;
  54.                 for (var r=1; r<= size; r++) {
  55.                             this[r] = new makeEntry();
  56.                             this[r].Date = datesArray[r];
  57.                             this[r].Name = namesArray[r];
  58.                             this[r].URL = urlsArray[r];
  59.                             this[r].Desc = descArray[r];
  60.                             }
  61.                     return this;
  62.             }
  63.  
  64. // implementing object libraries
  65.  
  66. // data from home page
  67.  
  68. var linksize=0 // number of entries, is used for index for many arrays
  69.  
  70. datesArray = new makeArray(linksize);
  71. namesArray = new makeArray(linksize);
  72. urlsArray = new makeArray(linksize);
  73. descArray = new makeArray(linksize);
  74.  
  75. //--------data-----------
  76.  
  77. var arraycount=0
  78.  
  79. arraycount += 1 
  80. datesArray[arraycount] = "(Aug.2.96)"
  81. urlsArray[arraycount] = "../javascript/how2java.htm"
  82. namesArray[arraycount] = "User Defined Functions, Methods and Objects"
  83. descArray[arraycount] = "Shows you the way to make customized javascript scripts in clear, easy-to-understand language."
  84.  
  85. arraycount += 1 
  86. datesArray[arraycount] = "(Oct.1.96)"
  87. urlsArray[arraycount] = "resource.htm"
  88. namesArray[arraycount] = "The Greatest Collection of Web Links and Resources Ever!!"
  89. descArray[arraycount] = "Includes links to lots of software, web resources, phone number searches, address searches, medical information."
  90.  
  91.  
  92. arraycount += 1 
  93. datesArray[arraycount] = "(Jun.10.96)"
  94. urlsArray[arraycount] = "../javascript/webmaker.htm"
  95. namesArray[arraycount] = "WebMaker - HTML Generator"
  96. descArray[arraycount] = "Create your own web pages, view them during creation, then e-mail yourself the code!"
  97.  
  98. arraycount += 1 
  99. datesArray[arraycount] = "(Sep.19.96)"
  100. urlsArray[arraycount] = "../javascript/mailit.htm"
  101. namesArray[arraycount] = "CGI-less Javascript form e-mailer"
  102. descArray[arraycount] = "Has lots of helpful advertising tips for graphics, layout, look and feel.  Gives ways to get maximum hits to your site!"
  103.  
  104. arraycount += 1 
  105. datesArray[arraycount] = "(Jun.10.96)"
  106. urlsArray[arraycount] = "adTips.htm"
  107. namesArray[arraycount] = "Web Advertising Tips"
  108. descArray[arraycount] = "Has lots of helpful advertising tips for graphics, layout, look and feel.  Gives ways to get maximum hits to your site!"
  109.  
  110. arraycount += 1 
  111. datesArray[arraycount] = "(Sep.16.96)"
  112. urlsArray[arraycount] = "../javascript/convrt.htm"
  113. namesArray[arraycount] = "Unit convertor"
  114. descArray[arraycount] = "Javascript Application demo-ing unit conversion!"
  115.  
  116.  
  117.  
  118. arraycount += 1 
  119. datesArray[arraycount] = "(Oct.1.96)"
  120. urlsArray[arraycount] = "web_ref.htm"
  121. namesArray[arraycount] = "Web Creation Resources"
  122. descArray[arraycount] = "Lots of HTML guide links, graphics links and javascript applications!"
  123.  
  124.  
  125.  
  126. arraycount += 1 
  127. datesArray[arraycount] = "(Jun.10.96)"
  128. urlsArray[arraycount] = "prices.htm"
  129. namesArray[arraycount] = "WebNation Pricing Structure"
  130. descArray[arraycount] = "Gives complete prices lists for all of our services.  We won't leave you guessing!"
  131.  
  132.  
  133. arraycount += 1 
  134. datesArray[arraycount] = "(Jun.10.96)"
  135. urlsArray[arraycount] = "directry.htm"
  136. namesArray[arraycount] = "100 Places to Link your Web Pages for Free"
  137. descArray[arraycount] = "Great resource to increase hits and traffic to your Web pages!"
  138.  
  139.  
  140. arraycount += 1 
  141. datesArray[arraycount] = "(Aug.22.96)"
  142. urlsArray[arraycount] = "../javascript/java_ref.htm"
  143. namesArray[arraycount] = "Javascript References"
  144. descArray[arraycount] = "Some useful javascript utilities, working examples and source code, as well as an article on javascript properties and objects!"
  145.  
  146.  
  147. arraycount += 1 
  148. datesArray[arraycount] = "(Jun.12.96)"
  149. urlsArray[arraycount] = "../javascript/clock.htm"
  150. namesArray[arraycount] = "Javascript Clock"
  151. descArray[arraycount] = "A cool little javascript clock, along with source code!"
  152.  
  153.  
  154.  
  155. arraycount += 1 
  156. datesArray[arraycount] = "(Jun.8.96)"
  157. urlsArray[arraycount] = "../javascript/calcjava.htm"
  158. namesArray[arraycount] = "Javascript Calculator"
  159. descArray[arraycount] = "A javascript mortgage calculator along with source code!"
  160.  
  161.  
  162.  
  163.  arraycount += 1 
  164. datesArray[arraycount] = "(Jun.5.96)"
  165. urlsArray[arraycount] = "../javascript/bgcolor.htm"
  166. namesArray[arraycount] = "Javascript Background Color Changer"
  167. descArray[arraycount] = "Yeah, it's been done to death, but this one is simple and teaches all the properties of bgcolor object.  Source code is included, of course!"
  168.  
  169. arraycount += 1 
  170. datesArray[arraycount] = "(Jun.2.96)"
  171. urlsArray[arraycount] = "../javascript/javahelp.htm"
  172. namesArray[arraycount] = "Javascript Objects and their Uses"
  173. descArray[arraycount] = "A great article for the beginning and experienced javascript programmer!  Teaches the date, background, math properties, string properties and much, much more."
  174.  
  175. arraycount += 1 
  176. datesArray[arraycount] = "(Jun.15.96)"
  177. urlsArray[arraycount] = "../javascript/nw_clock.htm"
  178. namesArray[arraycount] = "Javascript Clock"
  179. descArray[arraycount] = "Another javascript real-time clock and date, along with source code!"
  180.  
  181. arraycount += 1 
  182. datesArray[arraycount] = "(Aug.13.96)"
  183. urlsArray[arraycount] = "macstuff.htm"
  184. namesArray[arraycount] = "Macintosh development tools for the Web"
  185. descArray[arraycount] = "Very complete reference for the hard-to-find Mac applications!!!"
  186.  
  187.  
  188. //alert(arraycount)
  189. linksize = arraycount;
  190. // ----end data -------
  191.  
  192. function showAll(linkobj) {
  193.         for (var s=1; s<= linkobj.length; s++) {
  194.                         showLink(linkobj,s);
  195.                 }
  196.             }
  197.  
  198. function showLink (links, index) {
  199.     //document.write("<table border>");
  200.     document.write("<tr><td>" + links[index].Date +"</td>");
  201.     document.write("<td><a href=" + links[index].URL +">" + links[index].Name + "</a></td>");
  202.     document.write("<td>" + links[index].Desc + "</td></tr>");
  203.     //document.write("</table>");
  204.     }
  205.  
  206.  
  207.  
  208. function searchLinks(links, keyword){
  209.     document.write("Search results for keyword:" +keyword +"<br>");
  210.                document.write("<table border>");
  211.     for (var q=1; q<=links.length; q++) {
  212.             //document.write(q+".")
  213.             if (links[q].URL.indexOf(keyword) != -1){
  214.             //    document.write("Search Results for keyword: "+keyword+ "<br>" +links[q].Name +"<p>")
  215.             //document.write("Search Results for keyword: "+keyword+ "<br>" );
  216.                 showLink(links,q);
  217.                 continue;
  218.             }
  219.             if (links[q].Desc.indexOf(keyword) != -1) {
  220.                     showLink(links,q);
  221.                 continue;
  222.             }
  223.             if (links[q].Date.indexOf(keyword) != -1) {
  224.                 showLink(links,q);
  225.                 continue;
  226.             }
  227.  
  228.             if (links[q].Name.indexOf(keyword) != -1) {
  229.                     showLink(links,q);
  230.                     continue;
  231.             }
  232.         }
  233.     document.write("</table>");
  234.     }                    
  235.  
  236. // final stuff
  237. // the main program ---
  238.  
  239.  
  240. jsi = new makeLinks(linksize);
  241. document.write("<title>Search</title><body bgcolor=white>");
  242.  
  243.  
  244. searchLinks(jsi, prompt("(Warning! dont use very common keywords like 'www' It will crash your browser!) \rSearch everywhere for :","javascript"));
  245.  
  246. document.write("<hr>");
  247.  
  248. document.write("This searches all areas (Date, Name, URL, and Description) for matches ");
  249. document.write("and returns a list of hits.  The keyword is case sensitive. ");
  250. document.write("Click <b>search again</b> for another search. <hr>");
  251. document.write("<form><input type=button onClick='history.go(0)' value='Search Again'></form>");
  252.  
  253.  
  254. // show all the links
  255. //document.write("<table border>");
  256. //showAll(jsi);
  257.  
  258. //document.write("</table>");
  259.  
  260. </SCRIPT>
  261. </HEAD>
  262. <BODY>
  263.  
  264. <CENTER><IMG SRC="wnjump.jpg" BORDER=0 ></CENTER>
  265.  
  266. <CENTER> </CENTER>
  267.  
  268. </BODY>
  269. </HTML>
  270.