Ver Mensaje Individual
  #12 (permalink)  
Antiguo 11/07/2007, 14:46
jaorcor
 
Fecha de Ingreso: julio-2007
Mensajes: 6
Antigüedad: 16 años, 9 meses
Puntos: 0
Re: Crear Buscador

Estimado:
yo tengo un ejemplo de eso que tu necesitas aqui va, reemplaza www.pelambres.cl po tu pagina

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Buscador Google</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<FORM NAME="frmGoogle"
ONSUBMIT="javascript:MiGoogle( document.frmGoogle.topicos.value );
return(false);">
<P><FONT FACE="verdana" SIZE="2"><B>Ingrese datos a Buscar:</B><BR>
<INPUT TYPE="text" SIZE="70" NAME="topicos">
<INPUT TYPE="submit" VALUE="Buscar"> </FONT></P> </FORM><!--- Funcion en JavaScript (requerida!) --->
<SCRIPT LANGUAGE="JavaScript">

function MiGoogle( Topicos )
{

// Verificamos que hayan ingresado alguna palabra..

if(!Topicos)
{ alert( "Por favor ingresa los topicos por los cuales buscar." ); return; }

////////////////////////////////////////////////
// //
// Modifica el valor de la variable "MiSitio" //
// por TU dominio. //
// //
////////////////////////////////////////////////

var MiSitio = "http://www.pelambres.cl";

window.open
(
"http://www.google.com/search?q=site:" + "http://www.pelambres.cl" + "+" + Topicos
);

}

</SCRIPT>

<!--- Fin del Script-->

</body>
</html>


aqui va otro


<HTML>

<HEAD>
<base target="leftframe">
<TITLE>UN JAVASCRIPT A LA SEMANA - demostración práctica </TITLE>

<style>
A:link, A:visited { text-decoration: none }
A:hover { text-decoration: underline }
</style>


</HEAD>
<BODY BGCOLOR="white" vlink="blue" link="blue">

<br><br><br>
<div align=center>

<font size="2" face="arial">
<script
LANGUAGE="JavaScript">

<!-- Hide Script from Old Browsers
/*

Optimized by Daniel Bergman [http://botw.cjb.net].

Java Search Engine
(c)1997 Adam ALLEN.
Version 2.0
You may use this search engine on your page, but keep this
notice intact, and at the bottom of leave the Copyright notice at
the bottom of this page.
This scripts is my property, so please honnour my requests,
If you do so, you may freely copy, distribute, give this scripts
But it will FOREVER REMAIN MY PROPERTY.
This is the first Java Script that I have wrote, and am proud of it,
I feel pleased that I can contribute back to the bank of JavaScripts
that I have used on my page from other people, AN EYE FOR AN EYE!
*/

Keyword = new Object();
Descrip = new Object();
Address = new Object();

// Keyword[0] = n (where n is the number of keywords which can be searched
Keyword[0] = 6

// Each entry is split into
// Keyword[n] = text (where text is the keyword of which the entry is to
// be searched by (type Keywords in lowercase)
// Descrip[n] = text (where text is the description associated to this entry
// Address[n] = text (where text is the URL associated to the entry
// n is the entry number.

Keyword[1] = "javascript"
Descrip[1] = "350 ejemplos javascript gratis"
Address[1] = "http://www.htmlpoint.com/jscript"

Keyword[2] = "html"
Descrip[2] = "La guía en italiano al HTML"
Address[2] = "http://www.htmlpoint.com/guida"

Keyword[3] = "applet"
Descrip[3] = "Más de 300 applet Java para descargar"
Address[3] = "http://www.htmlpoint.com/java"

Keyword[4] = "cgi"
Descrip[4] = "El punto de referencia italiano sobre CGI"
Address[4] = "http://www.htmlpoint.com/cgi"

function checkDatabase() {

var Found = false
var Item = document.forms[0].searchfor.value.toLowerCase();

stats='toolbar=no,location=no,directories=no,statu s=no,menubar=no,height=220,width=600,'
stats += 'scrollbars=yes,resizable=yes'
MsgBox = window.open ("","msgWindow",stats)
MsgBox.opener = window;
MsgBox.opener.name = "opener";
MsgBox.document.write("<head><title>Resultados de la búsqueda</title></head>");
MsgBox.document.write ("<body bgcolor=white text=black link=blue vlink=darkblue alink=blue><H2><CENTER><font face=arial>Resultados de la búsqueda</CENTER></H2>")
MsgBox.document.write ("<font size=3><b><center>Para el término: "+Item+"</center><hr width=50%></b></font>");
for (var i=1; i <= Keyword[0]; i++) {
if(Item == Keyword[i]) {
Found = true;
MsgBox.document.write ("<FORM><CENTER>")
MsgBox.document.write ("<li><font face=arial><font size=2><b>"+Descrip[i]+"<BR><A HREF="+Address[i]+" target='opener'>Haz clic aquí</A></font></font>")
MsgBox.document.write ("</CENTER></FORM>")
}
}
if(!Found)
MsgBox.document.write ("<H4>Ningún resultado</H4>")
// Leave the line below intact if you want to legally use this script
MsgBox.document.write ("<FORM><CENTER>")
MsgBox.document.write ("<font size=2><font color=arial><INPUT type='button' value='CERRAR' onClick = 'self.close()'></font></font>")
MsgBox.document.write ("</CENTER></FORM>")
// There must be my notice above if you are to use this script legally.
// It took many hours work, fairs is fair, I just want that little line in
// and you get a fully working Search ENGINE, for FREE, on your site
// In Java Scripts as well, and not crap JAVA!
// Also a copyright notice MUST appear with the form.
}
// -->

</script>

</font>
<form NAME="form1">
<font size="2" face="arial"><strong>Ingrese Datos a Buscar</strong><br>
<input TYPE="text" NAME="searchfor" VALUE="JavaScript" SIZE="80">
<input type="button" value="BUSCAR" onClick="checkDatabase()">
</font>
</form>
</div>

</div>


</BODY>
</HTML>

si puedes ayudarme tu ahora, yo necesito un buscador en mi pagina pero este buscador debe ir a buscar a una base de datos access, si tienes algun ejemplo ayudame porfavor..

javier