Foros del Web » Programando para Internet » ASP Clásico »

ayuda con buscador convinado

Estas en el tema de ayuda con buscador convinado en el foro de ASP Clásico en Foros del Web. Bueno les cuento tengo un buscador con opción a buscar noticias de mi sitio y otra opción para realizar búsquedas en google, la cosa es ...
  #1 (permalink)  
Antiguo 23/01/2008, 06:39
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
ayuda con buscador convinado

Bueno les cuento tengo un buscador con opción a buscar noticias de mi sitio y otra opción para realizar búsquedas en google, la cosa es que por separado todo me funciona super bien pero al unirlo alguno no funciona, alguien podria orientarme o darme una mano?

este es el codigo

Código:
<%
//   -= Ch0rOy =-  Buscador Web mediante API's Google 
//
//   Este codigo es LIBRE y puedes distribuirlo y/o modificarlo libremente.
//     Lo unico que pido es que no borres esto si lo vas a distribuir.
//
//   Esta basado en otros codigos que circulan por la red, pero que, 
//   por lo menos a mi no me funcionaban.
//   Y extraido de mi pagina web www.caravacaonline.net para mis amigos
//   de www.forosdelweb.com, una gran comunidad sin la que seguro que no
//   sabria lo que se. 
//
//
//   [email protected]
%>

<% Response.Buffer = True %>

    <%keywords=request.querystring("keywords")
      keywords=Replace(keywords,"á","a")
      keywords=Replace(keywords,"é","e")
      keywords=Replace(keywords,"í","i")
      keywords=Replace(keywords,"ó","o")
      keywords=Replace(keywords,"ú","u")
      keywords=Replace(keywords,"ñ","n")
      keywords=Replace(keywords,"Á","A")
      keywords=Replace(keywords,"É","E")
      keywords=Replace(keywords,"Í","I")
      keywords=Replace(keywords,"Ó","O")
      keywords=Replace(keywords,"Ú","U")
      keywords=Replace(keywords,"Ñ","N")      
      if keywords="" then%>
<form method=get action=<% =request.servervariables("URL") %> name="buscador">
                                        <input type="text" name="keywords" size="50">
                                        <input type="hidden" name="h" value="0">
                                        <input type="submit" value="Buscar">&nbsp;<br>                                        
                                                Buscar:
                                                <input type="radio" name="opc" value="web" checked>
                                                Noticias
                                                <input type="radio" name="opc" value="spa">
                                                Google en español<br>
                                                <br>                                                
                                    <hr>
                                    <b>Introduzca en el formulario de arriba los criterios de búsqueda.</b>
     <%else
     opc=Request("opc")
     if opc="" then opc="all"
     
                  keywordsinput=request("keywords")
                 keywordsinput=Replace(keywordsinput,CHR(34),"&quot;")%>
                    
                                 <form method=get action=<% =request.servervariables("URL") %> name="buscador">
                                        <input type="text" name="keywords" size="50" value="<%= keywordsinput %>">
                                        <input type="hidden" name="h" value="0">
                                        <input type="submit" value="Buscar">&nbsp;<br>
                                                Buscar:
                                                <input type="radio" name="web" value="web" <%if opc="web" then%>checked<%end if%>>
                                                Noticias
                                                <input type="radio" name="spa" value="spa" <%if opc="spa" then%>checked<%end if%>>
                                                Google en español<br>
                                                <br>                                                
       </p>                                                
 <%

            ' ########################################################
            '               INICIO PERSONALIZACION DE DATOS
            ' Aqui debes introducir la "key" que te proporciona Google
            key = "xxxxxxxxxxxxxxxxxxxxxxxxxxxx"
            ' Aqui tu direccion web SIN http://
            web = "http://www.xxxxxxxxxx.com.ar"
            ' Aqui la URL donde se encuentra el script 
            URL = "http://www.xxxxxxxxxxxxx.com.ar/buscador.asp"
            ' #########################################################


maxResults = 10
  
if opc="web" then

    'dim PathDataBase
    PathDataBase="/database/mibasedeDatos.mdb"
    set Con = Server.CreateObject("ADODB.Connection")
    set resNoticias = Server.CreateObject("ADODB.RecordSet")
    Con.Open "Driver={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath(PathDataBase)
    %>
    <%
    search = trim(Request("search"))
    
    Dim resultado
    Function CreaNav(varPagTotales, varPagActual)
        '### Modificar el contenido de las constantes para cambiar el aspecto de la barra de navegación ###
        CONST styleTable = "font-family: Arial, Helvetica, sans-serif; font-size: 14px;" 'background-color:#999999; solid #000000; 
        CONST styleCeldaPagXdeY = ""'"color: #000000; background-color: #C0C0C0;"
        CONST classEnlace = "LikBuscador"
        CONST styleCeldaPagActual = "font-size: 20px; font-weight:bold; color: #FF0000;" '"background-color:#F9F9F9; "
        CONST styleCeldaPagLink = "LikBuscador"'"background-color:#F0F0F0"
        CONST styleCeldaTexto= "font-family: Arial, Helvetica, sans-serif; font-size: 12px; Color: #999999; "
    
        '### NO MODIFICAR LUEGO DE ESTA LINEA ###
        arrPaginaActualBarNav = Split(Request.ServerVariables("SCRIPT_NAME"), "/") 'Revisión 4
        PaginaActualBarNav = arrPaginaActualBarNav(UBound(arrPaginaActualBarNav  )) 'Revisión 4
    
        If varPagTotales > 1 Then 'Revisión 3
            MostrarPrimera = False
            If varPagTotales > 5 Then MostrarUltima = True
        
            TablaTMP = "<table border=""0"" cellpadding=""0"" cellspacing=""2"" style=""" & styleTable & """ align=""center""><tr>"
            TablaTMP = TablaTMP & "<td style=""" & styleCeldaTexto & """>&nbsp;P&aacute;gina " & varPagActual & " de " & varPagTotales & "&nbsp;</td>"
            If varPagActual >= 5 Then
                TablaTMP = TablaTMP & "<td style="""& StyleCeldaPagLink &"""><a href="""& PaginaActualBarNav & "?Modu=buscador&Pagina=1&search=" & search & """ class=""" & classEnlace & """><img src=""/img/icons/FlechaFinIzq.gif"" width=""70"" height=""13"" border=""0""></a></td>"
        'Innecesario:
                TablaTMP = TablaTMP & "<td><a href="""& PaginaActualBarNav & "?Modu=buscador&eje=30&amp;page=" & varPagActual - 1 & "&search=" & search &  """ class=""" & classEnlace & """><img src=""img/icons/FlechaIzq.gif"" width=""15"" height=""13"" border=""0""></a></td>"
                RestaTMP = 2
                For i = 1 to 5
                    If i = 3 Then
                        TablaTMP = TablaTMP & "<td width=""20"" align=""center"" style=""" & StyleCeldaPagActual & """>" & varPagActual - RestaTMP & "</td>"
                    Else
                        TablaTMP = TablaTMP & "<td width=""20"" align=""center"" style=""" & StyleCeldaPagLink & """><a href="""& PaginaActualBarNav & "?Modu=buscador&eje=30&amp;page=" & varPagActual - RestaTMP & "&search=" & search &  """ class=""" & classEnlace & """>" & varPagActual - RestaTMP & "</a></td>"
                    End if
                    If varPagActual - RestaTMP = varPagTotales Then
                        MostrarUltima = False
                        Exit For
                    End if
                    RestaTMP = RestaTMP - 1
                Next
            Else
        '        For i = 1 to 5 ### BUG Revisión 1
                For i = 1 to 5' ### Revisión 1
                    If i <> varPagActual Then
                        TablaTMP = TablaTMP & "<td width=""20"" align=""center"" class="""& StyleCeldaPagLink &"""><a href="""& PaginaActualBarNav & "?Modu=buscador&eje=30&amp;page=" & i & "&search=" & search &  """ class=""" & classEnlace & """>" & i & "</a></td>"
                    Else
                        TablaTMP = TablaTMP & "<td width=""20"" align=""center"" style="""& StyleCeldaPagActual &""">" & i & "</td>"
                    End if
                Next
            End if
        ' Innecesario:    
        If varPagTotales > 5 AND varPagTotales <> varPagActual Then TablaTMP = TablaTMP & "<td><a href="""& PaginaActualBarNav & "?Modu=buscador&eje=30&amp;page=" & varPagActual + 1 & """ class=""" & classEnlace & """><img src=""img/icons/FlechaDer.gif"" width=""15"" height=""13"" border=""0""></a></td>"
            If MostrarUltima Then TablaTMP = TablaTMP & "<td style="""& StyleCeldaPagLink &"""><a href="""& PaginaActualBarNav & "?Modu=buscador&eje=30&amp;page=" & varPagTotales & "&search=" & search & """ class=""" & classEnlace & """><img src=""img/icons/FlechaFinDer.gif"" width=""59"" height=""13"" border=""0""></a></td>"
            TablaTMP = TablaTMP & "</tr></table>"
            CreaNav = TablaTMP
        End If
    End Function
    resultado=0
    %>
Continua
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla
  #2 (permalink)  
Antiguo 23/01/2008, 06:42
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: ayuda con buscador convinado

Código:
<div id="ContBuscador">
        <div id="CabezalBuscador"><img src="/img/fondos/buscador.png"></div>
        <form name="form1" method="post" action="index.asp?Modu=buscador">
        <div Class="inputBuscar">
        <%
        if not Request.Form("keywords")="" then
            CademaTemp=Request.Form("keywords")
        else
            if not Request.QueryString("keywords")="" then
                CademaTemp=Request.QueryString("keywords")
            end if
        end if
        %>
        <div align="right" style="width:471px; float:left">
            <input name="search" type="text" size="50" value="<%=CademaTemp%>" onSubmit="return CheckForm();">
        </div>
        <div style="width:180px; float:left; margin-left:10px; clear:right">
            <input name=submit1 type="image" value="Buscar" src="img/Botones/btn_ir.gif" width="60" height="21">
        </div>
        </div>
            <div align="center" style="margin-top:5px; margin-bottom:5px; font-family:'Trebuchet MS'; font-size:12px;">
            <label><input type="radio" name="Noticias" value="web" checked>Noticias</label>
            <label><input type="radio" name="Noticias" value="spa">Google</label>
        </div>
        </form>
        <div Class="Navegador">
        <%
        ' Mostramos el dato de que página estamos...
        Dim mostrar       'cantidad de registros a mostrar por página
        Dim cantN_paginas      'cantidad de páginas que recibimos
        Dim pagina_actual      'La página que mostramos
        Dim registro_mostrado      'Contador utilizado para mostrar las páginas
        Dim I        'Variable Loop
        Dim CademaTemp
                                        
        mostrar = 10 ' Pueden modificar este número para cambiar la cantidad de registros por página
        ' IF para saber que página mostrar
        If Request.QueryString("page") = "" Then
            pagina_actual = 1
        Else
            pagina_actual = CInt(Request.QueryString("page"))
        End If
        'ordenacion por filtros
        if not CademaTemp="" then 'Busca en noticias
            sqlNoticias ="SELECT * FROM tblDiario WHERE Titulo like'%" & search & "%' OR copete like '%" & search & "%' OR texto like '%" & search & "%' ORDER BY id"
            resultado=1
        else
            resultado=0
        end if
                                        
        ' Creamos el RecordSet y definimos la cantidad de registros a mostrar
        resNoticias.PageSize = mostrar
        resNoticias.CacheSize = mostrar
                                
        ' Abrimos la tabla...
        if resultado=1 then
            resNoticias.Open sqlNoticias, Con,3,1
            'contamos las páginas que se formaron con la variable mostrar.
            cantN_paginas = resNoticias.PageCount
        end if    
        ' Si el pedido de página cae afuera del rango,
        ' lo modificamos para que caiga adentro
        If pagina_actual > cantN_paginas Then pagina_actual = cantN_paginas
        If pagina_actual < 1 Then pagina_actual = 1                               
        ' Si la cantidad de páginas da 0 es que no hay registros... por eso este IF
        if not resultado=0 then
            If cantN_paginas = 0 Then
                Response.Write ("<p style=""font-family: Arial, Helvetica, sans-serif; font-size: 13px; Color: #666666; "" align='center' >")
                Response.Write ("&nbsp;<strong>No se ha encontrado nada con...")                    
                Response.Write ("&nbsp;")& Request("search") & ("</strong>")
                Response.Write ("<br>")
                Response.Write("<img src='/img/icons/downarrow-1.gif' width='12' height='12' border='0'>&nbsp;<a href='javascript:history.go(-1)' class='LikBuscador'>&nbsp;Atr&aacute;s</a>")
            Else
                Response.Write ("<p style=""font-family: Arial, Helvetica, sans-serif; font-size: 13px; Color: #666666; "" align='left' >")
                Response.Write ("&nbsp;Se han encontrado con la palabra ")
                Response.Write ("&nbsp;<strong>")& CademaTemp & ("</strong>,&nbsp;cantidad de notas") & ("&nbsp;") & resNoticias.RecordCount
                ' Nos movemos a la página elegida
                resNoticias.AbsolutePage = pagina_actual
                ' Mostramos el dato de que página estamos...
            %>
            <%= CreaNav(cantN_paginas, pagina_actual)%>
            </div>
            <div class="contResultados">
                <%
                ' Hacemos el bucle mostrando los datos del registro
                registro_mostrado = 0
                    
                Do While registro_mostrado < mostrar And Not resNoticias.EOF
                    Color1="#F9F9F9"
                    Color2="#F0F0F0"
                    if colorfila=0 then
                        COLOR=Color1
                        colorfila=1
                    else
                        COLOR=Color2
                        colorfila=0
                    end if
                    %>
                    <div class="divlinkname">
                        <h3><a href="vernota.asp?id=<%= resNoticias("id") %>" class="lightwindow page-options artitle2" params="lightwindow_type=external"><%=resNoticias("Titulo")%></a></h3>
                    </div>
                    <%IF resNoticias("c-copete")=true then%>
                        <div class="divsum">
                            <%=resNoticias("copete")%>
                        </div>
                    <% End If %>
                    <div class="separadorBuscar"></div>
                    <%
                    ' Sumamos 1 a los mostrados
                    registro_mostrado = registro_mostrado + 1
                    ' Nos movemos al pr&oacute;ximo registro...
                    resNoticias.MoveNext
                Loop
                %>
            </div>
            <div Class="Navegador">
                <%
                ' Cerramos y limpiamos...
                resNoticias.Close
                Set resNoticias = Nothing
                Con.Close
                Set Con = Nothing%>
                <%= CreaNav(cantN_paginas, pagina_actual)%>
            <%end if
        end if%>
            </div>
    </div>
<%
else
  SoapText = "<?xml version='1.0' encoding='UTF-8'?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns1:doGoogleSearch xmlns:ns1='urn:GoogleSearch' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><key xsi:type='xsd:string'>" & key & "</key><q xsi:type='xsd:string'>" & keywords & "</q><start xsi:type='xsd:int'>" & request.querystring("h") & "</start><maxResults xsi:type='xsd:int'>" & maxResults & "</maxResults><filter xsi:type='xsd:boolean'>true</filter><restrict xsi:type='xsd:string'></restrict><safeSearch xsi:type='xsd:boolean'>false</safeSearch><lr xsi:type='xsd:string'>lang_es</lr> <ie xsi:type='xsd:string'>latin1</ie><oe xsi:type='xsd:string'>latin1</oe></ns1:doGoogleSearch></SOAP-ENV:Body></SOAP-ENV:Envelope>"

Googleurl = "http://api.google.com/search/beta2"
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.open "POST",Googleurl,"False"
objXML.setRequestHeader "Man", "POST"+" "+Googleurl+" HTTP/1.1"  
objXML.setRequestHeader "MessageType", "CALL"  
objXML.setRequestHeader "Content-Type", "text/xml"  
objXML.send SoapText
ResponsePage = objXML.responseText
Set objXML = Nothing
SoapTextSpelling ="<?xml version='1.0' encoding='UTF-8' ?><SOAP-ENV:Envelope xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance' xmlns:xsd='http://www.w3.org/1999/XMLSchema'><SOAP-ENV:Body><ns1:doSpellingSuggestion xmlns:ns1='urn:GoogleSearch' SOAP-ENV:encodingStyle='http://schemas.xmlsoap.org/soap/encoding/'><key xsi:type='xsd:string'>" & key & "</key><phrase xsi:type='xsd:string'>" & request.querystring("keywords") & "</phrase></ns1:doSpellingSuggestion></SOAP-ENV:Body></SOAP-ENV:Envelope>"
Set objXML = CreateObject("Microsoft.XMLHTTP")
objXML.open "POST",Googleurl,"False"
objXML.setRequestHeader "Man", "POST"+" "+Googleurl+" HTTP/1.1"  
objXML.setRequestHeader "MessageType", "CALL"  
objXML.setRequestHeader "Content-Type", "text/xml"  
objXML.send SoapTextSpelling
ResponsePageSpelling = objXML.responseText
Set objXML = Nothing
if inStr(ResponsePageSpelling,"</return>") then
Spelling=left(ResponsePageSpelling,inStr(ResponsePageSpelling,"</return>")-1)
Spelling=right(Spelling,len (Spelling)-inStr(Spelling,"<return")-29)
end if
spellingarray=Split(Spelling," ")
spellingmax=ubound(spellingarray)
Spellingitalic=Spelling
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla
  #3 (permalink)  
Antiguo 23/01/2008, 06:42
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: ayuda con buscador convinado

Código:
for j=0 to spellingmax
 if inStr(keywords,spellingarray(j))=0 then
   Spellingitalic=replace(Spellingitalic,spellingarray(j),"<b><i>"&spellingarray(j)&"</i></b>")
 end if
next
ResponsePage=Replace(ResponsePage," xsi:type=" & CHR(34) & "xsd:string" & CHR(34),"")
ResponsePage=Replace(ResponsePage,"&lt;b&gt;","<b>")
ResponsePage=Replace(ResponsePage,"&lt;/b&gt;","</b>")
ResponsePage=Replace(ResponsePage,"&lt;br&gt;","<br>")
EstimatedResults=left(ResponsePage,inStr(ResponsePage,"</estimatedTotalResultsCount>")-1)
EstimatedResults=right(EstimatedResults,len (EstimatedResults)-inStr(EstimatedResults,"<estimatedTotalResultsCount")-46)
EstimatedResults=Ccur(EstimatedResults)
StartResults=left(ResponsePage,inStr(ResponsePage,"</startIndex>")-1)
StartResults=right(StartResults,len (StartResults)-inStr(StartResults,"<startIndex")-30)
StopResults=left(ResponsePage,inStr(ResponsePage,"</endIndex>")-1)
StopResults=right(StopResults,len (StopResults)-inStr(StopResults,"<endIndex")-28)
SearchTime=left(ResponsePage,inStr(ResponsePage,"</searchTime>")-1)
SearchTime=right(SearchTime,len (SearchTime)-inStr(SearchTime,"<searchTime")-33)
SearchTime=left(SearchTime,len (SearchTime)-inStr(SearchTime,".")-2)
%>
<hr>
Página <b><%if request.querystring("h")=0 then%>1<%else%><%=left(request.querystring("h"),len(request.querystring("h"))-1)+1%></b><%end if%></b>
- Resultados <b><%=StartResults%> - <%=StopResults%></b> de aproximadamente <b><%= EstimatedResults %></b> para <b><%= request.querystring("keywords") %></b><%if opc="web" then%> dentro de <b><%=web%></b><%end if%> (<%=SearchTime%> segundos)&nbsp;&nbsp;&nbsp;&nbsp;
<hr><br>
<%if Spelling<>"" then%>
¿Quiso decir? &nbsp;<a href="<%= request.servervariables("URL") %>?keywords=<%= Spelling %>&h=0<%if opc<>"all" then%>&opc=<%=opc%><%end if%>"><%=Spellingitalic%></a><br><br>
<%end if%>
<%
public namearray
namearray=split (ResponsePage,"<item xsi:type=" & CHR(34) & "ns1:ResultElement" & CHR(34) & ">")
max=ubound(namearray)
    for i=1 to max
    theurl=left(namearray(i),inStr(namearray(i),"</URL>")-1)
    theurl=right(theurl,len (theurl)-instr(theurl,"<URL>")-4)
    if inStr(right(theurl,len(theurl)-6),"pdf") then
     tipo="pdf"
    else
     tipo="web"
    end if
    thetitle=left(namearray(i),inStr(namearray(i),"</title>")-1)
    thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<title>")-6)
    thetitle=Replace(thetitle, "&amp;", "&")
        if thetitle="" then
            thetitle=left(namearray(i),inStr(namearray(i),"</directoryTitle>")-1)
            thetitle=right(thetitle,len (thetitle)-inStr(thetitle,"<directoryTitle>")-15)
            thetitle=Replace(thetitle, "&amp;", "&")
        end if
        if thetitle="" then
            thetitle="SIN TITULO"
        end if
    thedescription=left(namearray(i),inStr(namearray(i),"</snippet>")-1)
    thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<snippet>")-8)
    thedescription=Replace(thedescription, "&amp;", "&")
        if thedescription = "" then
            thedescription=left(namearray(i),inStr(namearray(i),"</summary>")-1)
            thedescription=right(thedescription,len (thedescription)-inStr(thedescription,"<summary>")-8)
            thedescription=Replace(thedescription, "&amp;", "&")
        end if
    thesize=left(namearray(i),inStr(namearray(i),"</cachedSize>")-1)
    thesize=right(thesize,len (thesize)-instr(thesize,"<cachedSize>")-11)
                                    if tipo="pdf" then%><sup>[PDF] </sup><%end if%><a href="<%=theurl%>" target="_blank"><u><%=thetitle%></u></a><br>
                                    <%=thedescription%><br>
                                    <%=theurl%><%if thesize<>"" then%>    - <%=thesize%><%end if%> - <a href="http://www.google.com/search?q=cache:<%=theurl%>" target="_blank">En caché</a> - <a href="http://www.google.com/search?q=related:<%=theurl%>" target="_blank">Páginas similares</a><br><br>
    <%    next
    end if %>
                                 </form>
<%If EstimatedResults > maxResults then
      keywordsstr=request.querystring("keywords")
      keywordsstr=Replace(keywordsstr,CHR(34),"%22")%>
<hr>
<p align="center">
<table border="0" cellspacing="0" style="text-align: center">
                            <tr>
      <%If request.querystring("h") >= 10 Then%>
                              <td width="8">
                                <table border="0" cellspacing="1" bgcolor="#ffffff">
                                  <tr>                                  
                                    <td class="numero"><a href="<%= request.servervariables("URL") %>?keywords=<%= keywordsstr %>&h=<%= request.querystring("h")-10 %><%if opc<>"all" then%>&opc=<%=opc%><%end if%>" class="numero">
                                    &lt;&lt;ANTERIOR</a></td>
                                  </tr>
                                </table>
                              </td>
      <%end if%>
      <%If Ccur(Request.QueryString("h"))+10 < EstimatedResults Then%>
                              <td width="1">
                                <table border="0" cellspacing="1" bgcolor="#ffffff">
                                  <tr>
                                    <td class="numero"><a href="<%= request.servervariables("URL") %>?keywords=<%= keywordsstr %>&h=<%= request.querystring("h")+10 %><%if opc<>"all" then%>&opc=<%=opc%><%end if%>" class="numero">
                                    SIGUIENTE&gt;&gt;</a></td>
                                  </tr>
                                </table>
                              </td>
      <%End If%>
                            </tr>
</table>
</p>
<%end if
end if%>
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla
  #4 (permalink)  
Antiguo 23/01/2008, 20:18
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: ayuda con buscador convinado

nadie podria brindarme una ayuda?
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla

Última edición por virla; 25/01/2008 a las 06:22 Razón: para no hacer de nuevo la pregunta
  #5 (permalink)  
Antiguo 29/01/2008, 03:08
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: ayuda con buscador convinado

alguien que me pueda dar una mano, plis
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla
  #6 (permalink)  
Antiguo 29/01/2008, 10:51
Avatar de Shiryu_Libra
Colaborador
 
Fecha de Ingreso: febrero-2007
Ubicación: Cantando "Screenager" en "Kirafa Kaput"
Mensajes: 3.614
Antigüedad: 17 años, 2 meses
Puntos: 88
Re: ayuda con buscador convinado

Virla, el proposito es que te despliegue resultados con los dos buscadores?

pero si utilizas opciones tipo radio, logicamente tendrias que tener un tercer radio, que puedas utilizar para mandarle a las dos funciones el parametro deseado

seria mas facil de manipular si tuvieras estos codigos separados pero en tipo funcion
Cita:
Funcion BuscadorPropio(criterio)
.....
codigo
...
End Function
function BuscadorGoogle(criterio)
.....
codigo
...
End Function
Sub Formulario
....
end sub
para que esto??, por que asi reducirias tu validacion

tambien he mirado, que escribes esto....
Cita:
opc=Request("opc")
if opc="" then opc="all"
pero si te has dado cuenta, jamas llega vacio, por que en tu formulario ya tienes que siempre exista una opcion seleccionada, por lo tanto tendria que existir la posibilidad de un tercer radio button para elejir ambas

entonces tu codigo ya reestructurado, deberia ser similar a esto
Cita:
opc=request("opc")
select case opc
case 1 buscadorpropio(request("texto"))
case 2 buscadorgoogle(request("texto"))
case else
buscadorpropio(request("texto"))
buscadorgoogle(request("texto"))
end select
tambien en futuras modificaciones, no tendrias problemas en reestructuracion

no se que pienses al respecto???

__________________
"Eres parte del problema, parte de la solucion o parte del paisaje"
Un Saludo desde Desierto de Altar, Sonora, MX.
Shiryu_libra
  #7 (permalink)  
Antiguo 31/01/2008, 01:38
Avatar de virla  
Fecha de Ingreso: julio-2002
Ubicación: Rio Gallegos - Santa Cruz
Mensajes: 893
Antigüedad: 21 años, 10 meses
Puntos: 1
Re: ayuda con buscador convinado

ok lo probaremos y despues te cuento, pero de antemano te doy las gracias por tomarte un tiempo y ver mi codigo
__________________
---->Sin ayuda no se llega a ningun lado<----
Virla
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 03:33.