Ver Mensaje Individual
  #4 (permalink)  
Antiguo 09/04/2002, 21:50
Avatar de MARKWEB
MARKWEB
 
Fecha de Ingreso: septiembre-2001
Ubicación: En mi casa
Mensajes: 1.562
Antigüedad: 22 años, 7 meses
Puntos: 0
Re: Como buscar desde mi pagina cosas de un buscador?

function HandleForm(form) {
form.submit(); // This fixes a mysterious Netscape bug. Without this line,
// you can't use <enter> to start the search the first time.
var i, oldq=form.query.value, newq="";
for (i=0; i<oldq.length; i++) { // compress [ ]+ into \+
var thischar = oldq.charAt(i);
if (thischar != ' ')
newq += thischar;
else if (lastchar != ' ')
newq += '+';
lastchar = thischar;
}
var eng = engs[1+form.service.selectedIndex];
location.href = newq ? eng.pre_snark + newq + eng.post_snark : eng.home;
}

function DisplayForm() {
document.writeln('<CENTER><FORM OnSubmit="HandleForm(this); return false">');
document.writeln('Search <SELECT name="service">');
for (i=1; i <= engs.len; i++) {
document.writeln("<OPTION " + engs[I].opts + "> " + engs.name);
}
document.writeln('</SELECT> for <INPUT size=26 name="query">');
document.writeln('<input type=submit value=" GO!">');
document.writeln('</FORM> </CENTER>');
}

DisplayForm();

// done hiding from old browsers -->

</script>


No me alcanzo en un solo post asi que lo puse en dos esta parte de arriba es la continuacion disculpa las molestias solo unelos y tendras un buscador en tu web