Ver Mensaje Individual
  #95 (permalink)  
Antiguo 30/01/2003, 02:41
Avatar de epa2
epa2
 
Fecha de Ingreso: abril-2002
Ubicación: Málaga
Mensajes: 1.475
Antigüedad: 22 años, 7 meses
Puntos: 9
95.- Buscador Web en mi sitio

P: ¿Como pongo un buscador Web en mi sitio?

R: Con este código.

Creditos: No me acuerdo de donde lo bajé pero ahí pongo el autor. / Script by Jari Aarniala [www.mbnet.fi/~foo -- [email protected]]

Ver ejemplo: Pulsa aqui pecadoooorr

NOTA: Si este script estuviese repe, favor de hacermelo saber. Gracias.

Código:
<body>
<tr>
    <td width="100%">
    <p align="center">&nbsp;</td>
</tr>
<tr>
    <td width="100%">&nbsp;</td>
  </tr>
  <tr>
    <td width="100%" style="text-indent: 0" height="19">
    <span lang="es"><script language="JavaScript">
<!--

//
// Script by Jari Aarniala [www.mbnet.fi/~foo -- [email protected]]
//
// This script makes it easy to choose with which search engine
// you`d like to search the net. You may use this if you keep this
// text here...
//

function startSearch(){
searchString = document.searchForm.searchText.value; 
if(searchString != ""){
searchEngine = document.searchForm.whichEngine.selectedIndex + 1;
finalSearchString = "";

if(searchEngine == 1){
finalSearchString = "http://www.altavista.digital.com/cgi-bin/query?pg=q&what=web&fmt=.&q=" + searchString;
}
if(searchEngine == 2){
finalSearchString = "http://av.yahoo.com/bin/query?p=" + searchString + "&hc=0&hs=0";
}
if(searchEngine == 3){
finalSearchString = "http://www.excite.com/search.gw?trace=a&search=" + searchString;
}
if(searchEngine == 4){
finalSearchString = "http://www.hotbot.com/?SW=web&SM=MC&MT=" + searchString + "&DC=10&DE=2&RG=NA&_v=2&act.search.x=89&act.search.y=7";
}
if(searchEngine == 5){
finalSearchString = "http://www.infoseek.com/Titles?qt=" + searchString + "&col=WW&sv=IS&lk=noframes&nh=10";
}
if(searchEngine == 6){
finalSearchString = "http://www.lycos.com/cgi-bin/pursuit?adv=%26adv%3B&cat=lycos&matchmode=and&query=" + searchString + "&x=45&y=11";
}
if(searchEngine == 7){
finalSearchString = "http://netfind.aol.com/search.gw?search=" + searchString + "&c=web&lk=excite_netfind_us&src=1";
}

location.href = finalSearchString;
}
}


// -->
    </script>

<basefont face="Verdana, Arial, sans-serif">

</span>

<form name="searchForm">

<div align="center">
  <center>

<table width=323 border="2" cellpadding=3 cellspacing=0 bgcolor=444444 style="border-collapse: collapse" bordercolor="#111111">

<tr>
<td bgcolor=lightblue width="148"><font size="1"><span lang="es">Buscar por:</span></font><font size=1 face="Verdana, Arial, sans-serif"><span lang="es"><br>

</span>
<td bgcolor=lightblue width="96"><font size="1"><span lang="es">Buscar desde:</span></font><span lang="es"><td bgcolor=lightblue width="90"> 

<tr>
<td bgcolor=navajowhite width="148">
<input style="background: dddddd" name="searchText" type="text" size="20">
<td bgcolor=navajowhite width="96">
<select style="background: dddddd" name="whichEngine">
<option selected>Altavista
<option>Yahoo!
<option>Excite
<option>Hotbot
<option>Infoseek
<option>Lycos
<option>AOL Netfind
</select>
<td bgcolor=navajowhite width="90">
<input type="button" value="Buscar " onClick="startSearch()">

</select>
</table>
  </center>
</div>
</form>

</span>&nbsp;</td>
  </tr>
</body>
</html>
__________________

***Aprendiz de todo y maestro de nada***