Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
<html><HEAD>
<meta name="AUTHOR" content="GUJUM0deL (ketan mehta)">
<meta name="description" content="search engine using JS">
<SCRIPT LANGUAGE="JavaScript">
/*INSTRUCTIONS:
Ok, this is the setup and its quite simple to figure out if you know JS or any other type
of scripting language. First off in the ARRAYs you write in the HTML page, the path of the
site (which can be left blank), a description to what the link is, the keywords entered for
the search criteria, and finaly the description to what the link is about. (IF CONFUSED JUST RUN THE SCRIPT THE WAY IT IS FIRST AND SEE THE RESULTS! OR, JUST EMAIL ME BACK AND I'LL EXPLAIN)
*/
var item = new Array();
Km=0; item[Km]=new Array("hotmail.com","http://www.","Hotmail","all, any, free, email, e-mail","FREE E-Mails!!");
Km++; item[Km]=new Array("Yahoo.com","http://www.","Yahoo","all, any, yahoo","Wanna Yahoo!");
Km++; item[Km]=new Array("tvguide.com","http://www.","TVGuide.com","all, any, tv, guide, shows","TV Guide");
//YOU CAN EDIT WHAT THE NEW WINDOW WILL LOOK LIKE, SUCH AS TEXT COLOR, BACKGROUND COLOR, LINK COLOR.
pageview="<html><head><title>Search Results</title></head><body bgcolor='black' text='white' link='#bda940' vlink='#cccccc'><left><table border=0 width=200>";
function search(formfld) {
//YOU CAN EDIT THE WINDOW PROPERTIES ONLY, NOTHING ELSE.
windw = window.open("","","toolbar=no,location=no,directories=no,status=no,menubar=no,height=215,width=250, scrollbars=yes,resizable=no");
//DO NOT EDIT FROM HERE!!
windw.document.write(pageview);
txt = formfld.searchvalue.value.split(" ");
findingval = new Array(); total=0;
for (i = 0; i < item.length; i++) {
findingval[i] = 0; order = new Array(0, 4, 2, 3);
for (j = 0; j < order.length; j++)
for (k = 0; k < txt.length; k++)
if (item[i][order[j]].indexOf(txt[k].toLowerCase()) > -1 && txt[k] != "")
findingval[i] += (j+1);
}
for (i = 0; i < findingval.length; i++) {
n = 0; w = -1;
for (j = 0;j < findingval.length; j++)
if (findingval[j] > n) { n = findingval[j]; w = j; };
if (w > -1) total += show(w, windw, n);
findingval[w] = 0;
}
windw.document.write("</table><br>Total found: "+total+"<br>");
windw.document.write("<INPUT onfocus='blur();' type='button' style='background-color:#004080; border-color:#004080; color:#FFFFFF;' value='Close' onClick='self.close()'");
//PLEASE LEAVE THIS PORTION HERE. IT IS MY AUTHOR'S TAG.
windw.document.write("<br><br><font size='1'><center>¬ 2001 by <A HREF='http://www.GEOCITIES.COM/GUJUm0deL' target='_blank'>GUJUm0deL</A>. All right reserved. </center></font> </body></html>");
}
/* This function is important. Here you actualy show what the search result window display.
DO NOT EDIT HERE. ONLY EDIT IF YOU KNOW WHAT YOU ARE DOING.
*/
function show(which,dniw,num) {
link = item[which][1] + item[which][0];
//If you want to you can change the 'target' to anything.
line = "<tr><td><a href="+link+" target='_new'>"+item[which][2]+"</a><br>";
line += item[which][4] + "<br><br></td></tr>";
/* By adding this tag: <br>"+link+" between the: + " on the above line you will display the
link in text well.
*/
dniw.document.write(line);
return true;
}
</script>
</HEAD>
<BODY bgcolor="#000000" text="bda94c">
<center>
<!--- leave the 'form method' line the way it is. ALL OF IT -->
<form method=get action="javascript:void(0)" onsubmit="search(this); return false;">
<tr><td>
<p><b><font color="ff0000">to see it in action type in:</font> </b></p>
<p>'all' to see all the search results. <i>Without the single quotes.</i><br>
'hotmail' to see the search result for that key word.<br>
You can also enter part of a word and the result will bring back the
entry. <i>Try entering: 'ail' and see what happens.</i><br>
</p>
<p> This script also has the <b>.toLowerCase()</b> so that it convert
all the search words to lowercase. In other words, this script is NOT
case sensitive!! áSo if you enter in HOTMAIL or hotMAil or hotMAIl,
you still get the right result.</p>
<p><i> Just makes sure that all the keywords are in lowercase in the Array
sction at the top...</i></p>
<p>NS and IE display it differently, <i>BUT IT WORKS IN BOTH BROWSERS!!
á</i>For a cooler effect use CSS for the textbox and buttons, like
I did. (áJust a note that NS4 will not display the CSS tags)</p>
<p><b>PLEASE LEAVE MY AUTHORSHIP IN THE SCRIPT THANKS.</b></p>
<p>
<input type=text name=searchvalue value="">
<input onFocus='blur();' type=submit value="Search" style="background-color:#004080; border-color:#004080; color:#FFFFFF;" name="Input">
</p>
</td>
</tr>
</form>
</center>
</body>
</html>