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

Problema con buscador ASP (no da resultados)

Estas en el tema de Problema con buscador ASP (no da resultados) en el foro de ASP Clásico en Foros del Web. Hola Estoy con una web en ASP (una web para una inmobiliaria) Estoy intentando hacerle el buscador en ASP pero por ejemplo si pongo todos ...
  #1 (permalink)  
Antiguo 06/09/2012, 05:16
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Problema con buscador ASP (no da resultados)

Hola
Estoy con una web en ASP (una web para una inmobiliaria)
Estoy intentando hacerle el buscador en ASP pero por ejemplo si pongo todos los parametros en "ALL (todos)" yle doy a buscar ya no me encuentra ninguna propiedad.

Si hago una busqueda muy filtrada, entonces si que me aparecen los pisos y tal pero si lo pongo todo en ALL, no aparece nada.


Si alguien puede ayudarme, le dire por privado cual es la web..
Gracias!
  #2 (permalink)  
Antiguo 06/09/2012, 06:28
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 23 años, 2 meses
Puntos: 535
Respuesta: Problema con buscador ASP (no da resultados)

Hola. No hablo por todos, pero privado se suele cobrar.
Por qué no colocás tu sentencia SQL -o código completo del buscador- a ver dónde puede estar el error?
__________________
...___...
  #3 (permalink)  
Antiguo 06/09/2012, 07:50
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

De acuerdo

Son 2 archivos los que forman el buscador: index2.asp y search_property1.asp

Los pongo en 4 mensajes porque no me deja mas de 10000 caracteres

Index2.asp (part 1)

Código:
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<link rel="shortcut icon" href="http://www.amandaproperties.com/img/favicon.ico">


<body onload="MM_preloadImages('img/home_over_properites_spain.png','img/properties_over_the coast.png','img/services_over_real_estate.png','img/contact_over_best_properties_costa_del_sol.png','img/links_over_buy_property_in_spain.png','img/login_over_db.png','img/info_over.png')">
<table width="998" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="999" height="149" valign="top" background="img/top_background_properties_spain.jpg"><table width="998" height="147" cellpadding="0" cellspacing="0">
      <tr>
        <td width="15" height="96" rowspan="2"><div align="left"></div></td>
        <td width="483" rowspan="2"><img src="img/top_logo_properties_CostaBlanca.jpg" alt="" width="356" height="66" /></td>
        <td width="483" height="54" valign="bottom"><table width="100" align="right" cellpadding="1" cellspacing="1">
          <tr>
            <td><a href="index_se.asp"><img src="img/svenska_flagga_svenska_Mäklare.jpg" alt="Svenska" width="22" height="22" border="0" /></a></td>
            <td><a href="index.asp"><img src="img/bandera_uk_properties_in_spain_costablanca_costa_calida.jpg" alt="English" width="22" height="22" border="0" /></a></td>
            <td><a href="index_es.asp"><img src="img/bandera_spain_properties_in_spain.jpg" alt="Español" width="21" height="22" border="0" /></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="50"><table width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="338"><div align="right" class="style3 style10"><img src="img/weather.png" alt="" width="109" height="12" /></div></td>
            <td width="1" align="left">
              <div align="left"></div>
            <td width="86" height="41" align="right" valign="top">
		<a href="http://www.wunderground.com/global/stations/08360.html?bannertypeclick=gizmotimetemp24">
  	    <div align="right"><img src="http://banners.wunderground.com/weathersticker/gizmotimetemp_metric24/language/www/global/stations/08360.gif" border=0
	  	alt="Click for Alicante, Spain Forecast" height=41 width=127> </div></td>
            <td width="10" align="left" valign="top">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="41" colspan="3" valign="middle"><table width="973" cellpadding="0" cellspacing="0">
          <tr>
            <td width="77"><div align="center"><a href="index.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home_property_spain','','img/home_over_properites_spain.png',1)"><img src="img/home_up_properites_spain.png" alt="Back to main page" name="Home_property_spain" width="65" height="35" border="0" id="Home_property_spain" /></a></div></td>
            <td width="116"><div align="left"><a href="properties_spain.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Properties_property_spain','','img/properties_over_the coast.png',1)"><img src="img/properties_up_the coast.png" alt="Browse trough all quality Spanish properties in Amanda Properties" name="Properties_property_spain" width="105" height="35" border="0" id="Properties_property_spain" /></a></div></td>
            <td width="94"><div align="left"><a href="real_estate_services.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Services_property_spain','','img/services_over_real_estate.png',1)"><img src="img/services_up_real_estate.png" alt="Before &amp; Afeter Sales Real Estate Services" name="Services_property_spain" width="86" height="35" border="0" id="Services_property_spain" /></a></div></td>
            <td width="65"><a href="information.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Info','','img/info_over.png',1)"><img src="img/info_up.png" alt="General Information" name="Info" width="63" height="35" border="0" id="Info" /></a></td>
            <td width="95"><div align="left"><a href="contact_properties_spain.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact_amanda_properties','','img/contact_over_best_properties_costa_del_sol.png',1)"><img src="img/contact_up_best_properties_costa_del_sol.png" alt="Exelent service and personal assistance" name="contact_amanda_properties" width="83" height="35" border="0" id="contact_amanda_properties" /></a></div></td>
            <td width="136"><div align="left"><a href="links_properties_spain.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links_to_the_best_properties_in_spain','','img/links_over_buy_property_in_spain.png',1)"><img src="img/links_up_buy_property_in_spain.png" alt="Useful links" name="links_to_the_best_properties_in_spain" width="64" height="35" border="0" id="links_to_the_best_properties_in_spain" /></a></div></td>
            <td width="388" valign="top"><table align="right" cellpadding="1" cellspacing="1">
              <tr>
                <td width="84"><img src="img/redsocial_properties.png" alt="" width="84" height="12" /></td>
                <td width="22"><img src="img/facebook_properties_villa_apartment.png" alt="Visit us in Facebook" width="22" height="22" /></td>
                <td width="24"><img src="img/Twitter_properties_spain.png" alt="" width="24" height="22" /></td>
                <td width="34"><img src="img/google_plus_properties_in_spain.png" alt="Visit us in Google plus" width="23" height="23" /></td>
                <td width="51"><a href="DB/menuaccess.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Log-in','','img/login_over_db.png',1)"><img src="img/login_up_db.png" alt="Restricted area" name="Log-in" width="51" height="26" border="0" id="Log-in" /></a></td>
              </tr>
            </table></td>
          </tr>
        </table>
          <div align="right"></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td></td>
  </tr>
  #4 (permalink)  
Antiguo 06/09/2012, 07:51
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

index2.asp (part 2)

Código:
  <tr>
    <td background="img/property_back.jpg"><table width="955">
      <tr>
        <td width="378" valign="top"><form id="Search" name="Search" method="post" action="search_property.asp">
            <br />
            <table width="331" align="center" background="img/transparent.png">
              <tr>
                <td height="29" colspan="2"><div align="center"><span class="style21">Search for your property here</span>:</div></td>
              </tr>
              
              <tr>
                <td class="style9"><div align="right" class="style20">Ref:</div></td>
                <td><select name="Ref" class="style3" id="Ref">
                  <option value="Total">All</option>
                  <%
While (NOT Ref.EOF)
%>
                  <option value="<%=(Ref.Fields.Item("Ref").Value)%>"><%=(Ref.Fields.Item("Ref").Value)%></option>
                  <%
  Ref.MoveNext()
Wend
If (Ref.CursorType > 0) Then
  Ref.MoveFirst
Else
  Ref.Requery
End If
%>
                </select></td>
              </tr>
              <tr>
                <td width="135" class="style9"><div align="right" class="style18">New or Resale:</div></td>
                <td width="184"><label>
                <select name="New_resale" class="style3" id="New_resale">
                  <option value="Total">All</option>
                  <option value="New Property">New Property</option>
                  <option value="Resale Property">Resale Property</option>
                    </select>
                </label></td>
              </tr>
              <tr>
                <td class="style3"><div align="right" class="style20">Location:</div></td>
                <td><label>
                    <select name="Town" class="style3" id="Town">
                      <option value="Total" <%If (Not isNull((Town.Fields.Item("Town").Value))) Then If ("Total" = CStr((Town.Fields.Item("Town").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%>>All</option>
                      <%
While (NOT Town.EOF)
%><option value="<%=(Town.Fields.Item("Town").Value)%>" <%If (Not isNull((Town.Fields.Item("Town").Value))) Then If (CStr(Town.Fields.Item("Town").Value) = CStr((Town.Fields.Item("Town").Value))) Then Response.Write("selected=""selected""") : Response.Write("")%> ><%=(Town.Fields.Item("Town").Value)%></option>
                      <%
  Town.MoveNext()
Wend
If (Town.CursorType > 0) Then
  Town.MoveFirst
Else
  Town.Requery
End If
%>
                    </select>
                    <div align="left"></div>
                  </label></td>
              </tr>
              <tr>
                <td class="style3"><div align="right" class="style20">Property type:</div></td>
                <td><label>
                    <select name="Type_English" class="style3" id="Type_English">
                      <option value="Total">Alll</option>
                      <option value="Apartment">Apartment</option>
                      <option value="Bungalow">Bungalow</option>
                      <option value="Townhouse">Townhouse</option>
                      <option value="Villa">Villa</option>
                      <option value="Duplex">Duplex</option>
                      <option value="Business premises">Business premises</option>
                      <option value="Plot Land">Plot Land</option>
                    </select>
                    <div align="left"></div>
                  </label></td>
              </tr>
              <tr>
                <td class="style3"><div align="right" class="style20">Bedrooms:</div></td>
                <td><div align="left">
                  <select name="Bedrooms" class="style3" id="Bedrooms">
                    <option value="Total">All</option>
                    <option value="1">1</option>
                    <option value="2">2</option>
                    <option value="3">3</option>
                    <option value="4">4</option>
                    <option value="5">5</option>
                    <option value="6">6</option>
                    <option value="7">7</option>
                    <option value="8">8</option>
                    <option value="9">9</option>
                    <option value="10">10</option>
                      </select>
                </div></td>
              </tr>
              <tr>
                <td class="style3"><div align="right" class="style20">Bathrooms:</div></td>
                <td><div align="left">
                    <select name="Bathrooms" class="style3" id="Bathrooms">
                      <option value="Total">All</option>
                      <option value="1">1</option>
                      <option value="2">2</option>
                      <option value="3">3</option>
                      <option value="4">4</option>
                      <option value="5">5</option>
                      <option value="6">6</option>
                      <option value="7">7</option>
                      <option value="8">8</option>
                      <option value="9">9</option>
                      <option value="10">10</option>
                    </select>
                </div></td>
              </tr>
              <tr>
                <td height="22" class="style3"><div align="right" class="style20">Max. Price:</div></td>
                <td><div align="left">
                    <label>
                    <select name="Price" id="Price">
                      <option value="Total">All</option>
                      <option value="50000">50.000 &euro;</option>
                      <option value="60000">60.000 &euro;</option>
                      <option value="70000">70.000 &euro;</option>
                      <option value="80000">80.000 &euro;</option>
                      <option value="90000">90.000 &euro;</option>
                      <option value="100000">100.000 &euro;</option>
                      <option value="120000">120.000 &euro;</option>
                      <option value="140000">140.000 &euro;</option>
                      <option value="160000">160.000 &euro;</option>
                      <option value="180000">180.000 &euro;</option>
                      <option value="200000">200.000 &euro;</option>
                      <option value="240000">240.000 &euro;</option>
                      <option value="260000">260.000 &euro;</option>
                      <option value="280000">280.000 &euro;</option>
                      <option value="300000">300.000 &euro;</option>
                      <option value="350000">350.000 &euro;</option>
                      <option value="400000">400.000 &euro;</option>
                      <option value="450000">450.000 &euro;</option>
                      <option value="500000">500.000 &euro;</option>
                      <option value="600000">600.000 &euro;</option>
                      <option value="700000">700.000 &euro;</option>
                      <option value="800000">800.000 &euro;</option>
                      <option value="900000">900.000 &euro;</option>
                      <option value="1000000">1.000.000 &euro;</option>
                      <option value="1500000">1.500.000 &euro;</option>
                      <option value="2000000">2.000.000 &euro;</option>
                      <option value="3000000">3.000.000 &euro;</option>
                      <option value="4000000">4.000.000 &euro;</option>
                      <option value="5000000">5.000.000 &euro;</option>
                    </select>
                    </label>
                </div></td>
              </tr>
              <tr>
                <td height="50">&nbsp;</td>
                <td><label>
                    <span class="style3">
                    <input name="Send" type="submit" class="style4" id="Send" value="Search" />
                    </span>
                    <div align="right" class="style3"></div>
                  </label></td>
              </tr>
            </table>
        </form></td>
        <td width="565" height="400" valign="top">&nbsp;</td>
      </tr>
    </table></td>
  </tr>
  #5 (permalink)  
Antiguo 06/09/2012, 07:52
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

search_property1.asp (PART 1)

Código:
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/amanda.asp" -->
<%
Dim Search_properties__varNew_resale
Search_properties__varNew_resale = "%"
If (Request.Form("New_resale") <> "") Then 
  Search_properties__varNew_resale = Request.Form("New_resale")
  Else 
  Search_properties__vartotal
End If
%>
<%
Dim Search_properties__vartotal
Search_properties__vartotal = "%"
If (Request.Form("New_resale")  <> "") Then 
  Search_properties__vartotal = Request.Form("New_resale") 
End If
%>
<%
Dim Search_properties
Dim Search_properties_cmd
Dim Search_properties_numRows

Set Search_properties_cmd = Server.CreateObject ("ADODB.Command")
Search_properties_cmd.ActiveConnection = MM_amanda_STRING
Search_properties_cmd.CommandText = "SELECT * FROM [Resale properties] WHERE ? = New_resale OR ?  = New_resale IN ('New Property',  'Resale Property')" 
Search_properties_cmd.Prepared = true
Search_properties_cmd.Parameters.Append Search_properties_cmd.CreateParameter("param1", 200, 1, 255, Search_properties__varNew_resale) ' adVarChar
Search_properties_cmd.Parameters.Append Search_properties_cmd.CreateParameter("param2", 200, 1, 255, Search_properties__vartotal) ' adVarChar

Set Search_properties = Search_properties_cmd.Execute
Search_properties_numRows = 0
%>
<%
Dim Repeat1__numRows
Dim Repeat1__index

Repeat1__numRows = 4
Repeat1__index = 0
Search_properties_numRows = Search_properties_numRows + Repeat1__numRows
%>
<%
'  *** Recordset Stats, Move To Record, and Go To Record: declare stats variables

Dim Search_properties_total
Dim Search_properties_first
Dim Search_properties_last

' set the record count
Search_properties_total = Search_properties.RecordCount

' set the number of rows displayed on this page
If (Search_properties_numRows < 0) Then
  Search_properties_numRows = Search_properties_total
Elseif (Search_properties_numRows = 0) Then
  Search_properties_numRows = 1
End If

' set the first and last displayed record
Search_properties_first = 1
Search_properties_last  = Search_properties_first + Search_properties_numRows - 1

' if we have the correct record count, check the other stats
If (Search_properties_total <> -1) Then
  If (Search_properties_first > Search_properties_total) Then
    Search_properties_first = Search_properties_total
  End If
  If (Search_properties_last > Search_properties_total) Then
    Search_properties_last = Search_properties_total
  End If
  If (Search_properties_numRows > Search_properties_total) Then
    Search_properties_numRows = Search_properties_total
  End If
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them

If (Search_properties_total = -1) Then

  ' count the total records by iterating through the recordset
  Search_properties_total=0
  While (Not Search_properties.EOF)
    Search_properties_total = Search_properties_total + 1
    Search_properties.MoveNext
  Wend

  ' reset the cursor to the beginning
  If (Search_properties.CursorType > 0) Then
    Search_properties.MoveFirst
  Else
    Search_properties.Requery
  End If

  ' set the number of rows displayed on this page
  If (Search_properties_numRows < 0 Or Search_properties_numRows > Search_properties_total) Then
    Search_properties_numRows = Search_properties_total
  End If

  ' set the first and last displayed record
  Search_properties_first = 1
  Search_properties_last = Search_properties_first + Search_properties_numRows - 1
  
  If (Search_properties_first > Search_properties_total) Then
    Search_properties_first = Search_properties_total
  End If
  If (Search_properties_last > Search_properties_total) Then
    Search_properties_last = Search_properties_total
  End If

End If
%>
<%
Dim MM_paramName 
%>
<%
' *** Move To Record and Go To Record: declare variables

Dim MM_rs
Dim MM_rsCount
Dim MM_size
Dim MM_uniqueCol
Dim MM_offset
Dim MM_atTotal
Dim MM_paramIsDefined

Dim MM_param
Dim MM_index

Set MM_rs    = Search_properties
MM_rsCount   = Search_properties_total
MM_size      = Search_properties_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
  MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter

if (Not MM_paramIsDefined And MM_rsCount <> 0) then

  ' use index parameter if defined, otherwise use offset parameter
  MM_param = Request.QueryString("index")
  If (MM_param = "") Then
    MM_param = Request.QueryString("offset")
  End If
  If (MM_param <> "") Then
    MM_offset = Int(MM_param)
  End If

  ' if we have a record count, check if we are past the end of the recordset
  If (MM_rsCount <> -1) Then
    If (MM_offset >= MM_rsCount Or MM_offset = -1) Then  ' past end or move last
      If ((MM_rsCount Mod MM_size) > 0) Then         ' last page not a full repeat region
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If

  ' move the cursor to the selected record
  MM_index = 0
  While ((Not MM_rs.EOF) And (MM_index < MM_offset Or MM_offset = -1))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
  If (MM_rs.EOF) Then 
    MM_offset = MM_index  ' set MM_offset to the last possible record
  End If

End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range

If (MM_rsCount = -1) Then

  ' walk to the end of the display range for this page
  MM_index = MM_offset
  While (Not MM_rs.EOF And (MM_size < 0 Or MM_index < MM_offset + MM_size))
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend

  ' if we walked off the end of the recordset, set MM_rsCount and MM_size
  If (MM_rs.EOF) Then
    MM_rsCount = MM_index
    If (MM_size < 0 Or MM_size > MM_rsCount) Then
      MM_size = MM_rsCount
    End If
  End If

  ' if we walked off the end, set the offset based on page size
  If (MM_rs.EOF And Not MM_paramIsDefined) Then
    If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
      If ((MM_rsCount Mod MM_size) > 0) Then
        MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
      Else
        MM_offset = MM_rsCount - MM_size
      End If
    End If
  End If

  ' reset the cursor to the beginning
  If (MM_rs.CursorType > 0) Then
    MM_rs.MoveFirst
  Else
    MM_rs.Requery
  End If

  ' move the cursor to the selected record
  MM_index = 0
  While (Not MM_rs.EOF And MM_index < MM_offset)
    MM_rs.MoveNext
    MM_index = MM_index + 1
  Wend
End If
%>
<%
' *** Move To Record: update recordset stats

' set the first and last displayed record
Search_properties_first = MM_offset + 1
Search_properties_last  = MM_offset + MM_size

If (MM_rsCount <> -1) Then
  If (Search_properties_first > MM_rsCount) Then
    Search_properties_first = MM_rsCount
  End If
  If (Search_properties_last > MM_rsCount) Then
    Search_properties_last = MM_rsCount
  End If
End If

' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters

Dim MM_keepNone
Dim MM_keepURL
Dim MM_keepForm
Dim MM_keepBoth

Dim MM_removeList
Dim MM_item
Dim MM_nextItem

' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then
  MM_removeList = MM_removeList & "&" & MM_paramName & "="
End If

MM_keepURL=""
MM_keepForm=""
MM_keepBoth=""
MM_keepNone=""

' add the URL parameters to the MM_keepURL string
For Each MM_item In Request.QueryString
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepURL = MM_keepURL & MM_nextItem & Server.URLencode(Request.QueryString(MM_item))
  End If
Next

' add the Form variables to the MM_keepForm string
For Each MM_item In Request.Form
  MM_nextItem = "&" & MM_item & "="
  If (InStr(1,MM_removeList,MM_nextItem,1) = 0) Then
    MM_keepForm = MM_keepForm & MM_nextItem & Server.URLencode(Request.Form(MM_item))
  End If
Next

' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
If (MM_keepBoth <> "") Then 
  MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
End If
If (MM_keepURL <> "")  Then
  MM_keepURL  = Right(MM_keepURL, Len(MM_keepURL) - 1)
End If
If (MM_keepForm <> "") Then
  MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
End If

' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
  If (firstItem <> "") Then
    MM_joinChar = "&"
  Else
    MM_joinChar = ""
  End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links

Dim MM_keepMove
Dim MM_moveParam
Dim MM_moveFirst
Dim MM_moveLast
Dim MM_moveNext
Dim MM_movePrev

Dim MM_urlStr
Dim MM_paramList
Dim MM_paramIndex
Dim MM_nextParam

MM_keepMove = MM_keepBoth
MM_moveParam = "index"

' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 1) Then
  MM_moveParam = "offset"
  If (MM_keepMove <> "") Then
    MM_paramList = Split(MM_keepMove, "&")
    MM_keepMove = ""
    For MM_paramIndex = 0 To UBound(MM_paramList)
      MM_nextParam = Left(MM_paramList(MM_paramIndex), InStr(MM_paramList(MM_paramIndex),"=") - 1)
      If (StrComp(MM_nextParam,MM_moveParam,1) <> 0) Then
        MM_keepMove = MM_keepMove & "&" & MM_paramList(MM_paramIndex)
      End If
    Next
    If (MM_keepMove <> "") Then
      MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
    End If
  End If
End If
  #6 (permalink)  
Antiguo 06/09/2012, 08:05
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

search_property1.asp (PART 2)

Código:
' set the strings for the move to links
If (MM_keepMove <> "") Then 
  MM_keepMove = Server.HTMLEncode(MM_keepMove) & "&"
End If

MM_urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="

MM_moveFirst = MM_urlStr & "0"
MM_moveLast  = MM_urlStr & "-1"
MM_moveNext  = MM_urlStr & CStr(MM_offset + MM_size)
If (MM_offset - MM_size < 0) Then
  MM_movePrev = MM_urlStr & "0"
Else
  MM_movePrev = MM_urlStr & CStr(MM_offset - MM_size)
End If
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="shortcut icon" href="http://www.amandaproperties.com/img/favicon.ico">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Welcome to Amanda Properties - Real Estate Specialist Spain</title>
<style type="text/css">
<!--
body {
	background-color: #000000;
	margin-left: 0px;
	margin-top: 5px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style3 {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 14px;
	list-style-type: none;
}
#top {
	position:absolute;
	width:200px;
	height:115px;
	z-index:1;
	visibility: visible;
	scrollbar-base-color: #EBD975;
}
#logotop {
	position:absolute;
	width:200px;
	height:115px;
	z-index:2;
	left: 40px;
	top: 11px;
	visibility: visible;
}
.style10 {
	font-size: 10px
}
a:link {
	color: #FFCC00;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #FFCC00;
}
a:hover {
	text-decoration: none;
	color: #FFFF99;
}
a:active {
	text-decoration: none;
	color: #FFFF99;
}
.style14 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; }
.style16 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #FFCC00; }
.style19 {
	color: #A8D0EC;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
}
.style20 {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #333333;
	font-weight: bold;
}
.style21 {font-family: Arial, Helvetica, sans-serif}
.style22 {font-size: 12px}
.style23 {color: #FFFFFF}
.style24 {
	color: #000000;
	font-weight: bold;
}
.style26 {color: #333333}
.style27 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; color: #333333; }
.style29 {font-size: 24px}
-->
</style>
<script src="SpryAssets/SpryEffects.js" type="text/javascript"></script>
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_effectAppearFade(targetElement, duration, from, to, toggle)
{
	Spry.Effect.DoFade(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
}
//-->
</script>
<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>
<link rel="shortcut icon" href="http://www.amandaproperties.com/img/favicon.ico">

<body onload="MM_preloadImages('img/home_over_properites_spain.png','img/properties_over_the coast.png','img/services_over_real_estate.png','img/contact_over_best_properties_costa_del_sol.png','img/links_over_buy_property_in_spain.png','img/login_over_db.png','img/info_over.png')">
<table width="998" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="999" height="149" valign="top" background="img/top_background_properties_spain.jpg"><table width="998" height="147" cellpadding="0" cellspacing="0">
      <tr>
        <td width="15" height="96" rowspan="2"><div align="left"></div></td>
        <td width="483" rowspan="2"><img src="img/top_logo_properties_CostaBlanca.jpg" alt="" width="356" height="66" /></td>
        <td width="483" height="54" valign="bottom"><table width="100" align="right" cellpadding="1" cellspacing="1">
          <tr>
            <td><a href="index_se.asp"><img src="img/svenska_flagga_svenska_Mäklare.jpg" alt="Svenska" width="22" height="22" border="0" /></a></td>
            <td><a href="index.asp"><img src="img/bandera_uk_properties_in_spain_costablanca_costa_calida.jpg" alt="English" width="22" height="22" border="0" /></a></td>
            <td><a href="index_es.asp"><img src="img/bandera_spain_properties_in_spain.jpg" alt="Español" width="21" height="22" border="0" /></a></td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="50"><table width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="338"><div align="right" class="style3 style10"><img src="img/weather.png" alt="" width="109" height="12" /></div></td>
            <td width="1" align="left">
              <div align="left"></div>
            <td width="86" height="41" align="right" valign="top">
		<a href="http://www.wunderground.com/global/stations/08360.html?bannertypeclick=gizmotimetemp24">
  	    <div align="right"><img src="http://banners.wunderground.com/weathersticker/gizmotimetemp_metric24/language/www/global/stations/08360.gif" border=0
	  	alt="Click for Alicante, Spain Forecast" height=41 width=127> </div></td>
            <td width="10" align="left" valign="top">&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td height="41" colspan="3" valign="middle"><table width="973" cellpadding="0" cellspacing="0">
          <tr>
            <td width="77"><div align="center"><a href="index.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Home_property_spain','','img/home_over_properites_spain.png',1)"><img src="img/home_up_properites_spain.png" alt="Back to main page" name="Home_property_spain" width="65" height="35" border="0" id="Home_property_spain" /></a></div></td>
            <td width="116"><div align="left"><a href="properties_spain.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Properties_property_spain','','img/properties_over_the coast.png',1)"><img src="img/properties_up_the coast.png" alt="Browse trough all quality Spanish properties in Amanda Properties" name="Properties_property_spain" width="105" height="35" border="0" id="Properties_property_spain" /></a></div></td>
            <td width="94"><div align="left"><a href="real_estate_services.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Services_property_spain','','img/services_over_real_estate.png',1)"><img src="img/services_up_real_estate.png" alt="Before &amp; Afeter Sales Real Estate Services" name="Services_property_spain" width="86" height="35" border="0" id="Services_property_spain" /></a></div></td>
            <td width="65"><a href="information.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Info','','img/info_over.png',1)"><img src="img/info_up.png" alt="General Information" name="Info" width="63" height="35" border="0" id="Info" /></a></td>
  #7 (permalink)  
Antiguo 06/09/2012, 08:06
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

search_property1.asp (PART 3)

Código:
            <td width="95"><div align="left"><a href="contact_properties_spain.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('contact_amanda_properties','','img/contact_over_best_properties_costa_del_sol.png',1)"><img src="img/contact_up_best_properties_costa_del_sol.png" alt="Exelent service and personal assistance" name="contact_amanda_properties" width="83" height="35" border="0" id="contact_amanda_properties" /></a></div></td>
            <td width="136"><div align="left"><a href="links_properties_spain.html" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('links_to_the_best_properties_in_spain','','img/links_over_buy_property_in_spain.png',1)"><img src="img/links_up_buy_property_in_spain.png" alt="Useful links" name="links_to_the_best_properties_in_spain" width="64" height="35" border="0" id="links_to_the_best_properties_in_spain" /></a></div></td>
            <td width="388" valign="top"><table align="right" cellpadding="1" cellspacing="1">
              <tr>
                <td width="84"><img src="img/redsocial_properties.png" alt="" width="84" height="12" /></td>
                <td width="22"><img src="img/facebook_properties_villa_apartment.png" alt="Visit us in Facebook" width="22" height="22" /></td>
                <td width="24"><img src="img/Twitter_properties_spain.png" alt=" " width="24" height="22" /></td>
                <td width="34"><img src="img/google_plus_properties_in_spain.png" alt="Visit us in Google plus" width="23" height="23" /></td>
                <td width="51"><a href="DB/menuaccess.asp" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Log-in','','img/login_over_db.png',1)"><img src="img/login_up_db.png" alt="Restricted area" name="Log-in" width="51" height="26" border="0" id="Log-in" /></a></td>
              </tr>
            </table></td>
          </tr>
        </table>
          <div align="right"></div></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td></td>
  </tr>
  
  <tr>
    <td background="img/property_back.jpg"><table width="955">
      <tr>
        <td height="400" valign="top"><table width="984" align="center">
          <tr>
            <td height="30" align="center">&nbsp;</td>
            <td align="center"><p><img src="img/property_search_results.png" alt="Luxury properties" width="343" height="52" /><br />
              </p>              </td>
            <td align="center">&nbsp;</td>
          </tr>
          <tr>
            <td width="119" align="center">&nbsp;</td>
            <td width="797" align="center" valign="top"><% 
While ((Repeat1__numRows <> 0) AND (NOT Search_properties.EOF)) 
%>
                <table width="375" align="left" cellpadding="2" cellspacing="2" background="img/transparent.png">
                  <tr>
                      <td colspan="3" background="img/back_table.jpg" class="style22 style21 style13 style1"><div align="left" class="style24"> <%=(Search_properties.Fields.Item("New_resale").Value)%> Ref: <%=(Search_properties.Fields.Item("Ref").Value)%></div></td>
                  </tr>
                  <tr>
                      <td rowspan="6" align="left" class="style7"><div align="left"><a href="resale_info.asp?<%= Server.HTMLEncode(MM_keepURL) & MM_joinChar(MM_keepURL) & "Id=" & Search_properties.Fields.Item("Id").Value %>"><img src="<%=(Search_properties.Fields.Item("Photo_01").Value)%>" alt="Properties in Spain" width="150" height="125" border="1" onload="MM_effectAppearFade(this, 1000, 0, 100, true)" /></a></div></td>
                    <td class="style7"><div align="left" class="style13 style21 style22 style26">
                            <div align="left">Property type:</div>
                      </div></td>
                    <td class="style7 style21 style22 style23"><div align="left" class="style26"><%=(Search_properties.Fields.Item("Type_English").Value)%></div></td>
                  </tr>
                  <tr>
                      <td class="style7"><div align="left" class="style13 style21 style22 style26">
                            <div align="left">Bedrooms:</div>
                      </div></td>
                    <td class="style7"><div align="left" class="style27">
                            <div align="left"><%=(Search_properties.Fields.Item("Bedrooms").Value)%></div>
                    </div></td>
                  </tr>
                  <tr>
                      <td class="style7"><div align="left" class="style13 style21 style22 style26">
                            <div align="left">Bathrooms: </div>
                          <div align="left" class="style13"></div>
                      </div></td>
                    <td class="style7"><div align="left" class="style27">
                            <div align="left"><%=(Search_properties.Fields.Item("Bathrooms").Value)%></div>
                    </div></td>
                  </tr>
                  <tr>
                      <td height="20" class="style7"><div align="left" class="style13 style21 style22 style26">
                            <div align="left">Town:</div>
                      </div></td>
                    <td class="style7"><div align="left" class="style27">
                            <div align="left"><%=(Search_properties.Fields.Item("Town").Value)%></div>
                    </div></td>
                  </tr>
                  <tr>
                      <td class="style7"><div align="left" class="style13 style21 style22 style26">
                            <div align="left">Area:</div>
                      </div></td>
                    <td class="style7"><div align="left" class="style27">
                            <div align="left"><%=(Search_properties.Fields.Item("Area").Value)%></div>
                    </div></td>
                  </tr>
                  <tr>
                      <td class="style7"><div align="left" class="style13 style21 style22 style26">
                          <div align="left">Price:</div>
                      </div></td>
                      <td class="style7"><div align="left" class="style27">
                          <div align="left" class="style22"><span class="style23"><span class="style26"></span></span><%= FormatCurrency((Search_properties.Fields.Item("Price").Value), 0, -2, -2, -2) %></div>
                      </div></td>
                  </tr>
                            </table>
                <% 
  Repeat1__index=Repeat1__index+1
  Repeat1__numRows=Repeat1__numRows-1
  Search_properties.MoveNext()
Wend
%>
                <span class="style21 style26 style29">
                <%
If (Search_properties_total) = ("0") Then 
  Response.Write("There where know results for your search, sorry for the inconvinience.")
End If
%>
                </span></td>
            <td width="66" align="center">&nbsp;</td>
          </tr>
          <tr>
            <td height="58" align="center">&nbsp;</td>
            <td align="center"><table width="750" align="left">
                <tr>
                  <td width="52" height="70" rowspan="2"><div align="left">
                    <% If MM_offset <> 0 Then %>
                      <img src="img/previous_up.png" alt="Previous page of properties" name="Previous_property" width="28" height="28" border="0" id="Previous_property" />
                      <% End If ' end MM_offset <> 0 %>
</div></td>
                  <td width="644"><div align="center" class="style20">Total number of properties:  <%=(Search_properties_first)%> of <%=(Search_properties_total)%></div></td>
                  <td width="38" rowspan="2"><% If Not MM_atTotal Then %>
                      <div align="right"> <a href="<%=MM_moveNext%>"><img src="img/next_up.png" alt="Next page of properties" name="Next_property" width="28" height="28" border="0" id="Next_property" /></a> </div>
                      <% End If ' end Not MM_atTotal %></td>
                </tr>
                <tr>
                  <td><table width="145" align="center" cellpadding="2" cellspacing="2">
                      <tr>
                        <td align="center" background="img/back_table.jpg" class="style14 style37"><a href="index.asp" class="style45"><strong><font color="#000000">Go back to Search</font></strong></a></td>
                      </tr>
                  </table></td>
                </tr>
            </table></td>
            <td align="center">&nbsp;</td>
          </tr>
        </table>
          </td>
        </tr>
    </table></td>
  </tr>
  #8 (permalink)  
Antiguo 18/09/2012, 09:52
 
Fecha de Ingreso: marzo-2008
Mensajes: 228
Antigüedad: 16 años, 1 mes
Puntos: 12
Respuesta: Problema con buscador ASP (no da resultados)

Pago 50 euros al que pueda arreglarlo o me ayude a arreglarlo
  #9 (permalink)  
Antiguo 18/09/2012, 11:55
Avatar de AlZuwaga
Colaborador
 
Fecha de Ingreso: febrero-2001
Ubicación: 34.517 S, 58.500 O
Mensajes: 14.550
Antigüedad: 23 años, 2 meses
Puntos: 535
Respuesta: Problema con buscador ASP (no da resultados)

Hola, ya te lo dije en otro post. Saludos.
__________________
...___...

Etiquetas: asp, buscadores
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.
Tema Cerrado




La zona horaria es GMT -6. Ahora son las 09:06.