Print Page | Close Window

dropdown search not working

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=8228
Printed Date: 01 April 2026 at 1:00am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: dropdown search not working
Posted By: simflex
Subject: dropdown search not working
Date Posted: 19 December 2003 at 2:42pm

All I want is get a search criteria from the kiser table into a dropdown box, select a location from that list and send them to searchResults.asp.

So far, when I run this form called searchForm.asp, the page is blank.

Can you please, please help!

 

Here the entire code for searchForm.asp

 

<%
Set myConn=Server.CreateObject("ADODB.Connection")
myConn.open("panoa")
SQLstr = "SELECT * FROM kiser WHERE loca IS NOT NULL ORDER BY loca"
Set RS = myConn.Execute (SQLstr)
%>

<html>
<head>
 <title Search For Address</title>
</head>
<body bgcolor="ffffff">
 <center><h2> Search For a Location:</h2>
 <form="selectRecordForm" action="SearchResults.asp" method="post">
  <table>
   <tr>
      <td>Location </td>
   </tr>
   <tr>
    <td>
       <select name="selLocation">
       <%
        Do while NOT RS.EOF
       %>
       <option value='<%=RS("loca")%>'
       <% if (RS("loca") = "Marsh Creek") Then
       Response.Write("SELECTED")
       End If%>>
       <%=RS("loca")%>
       <%
       RS.MoveNext
       Loop
       %>
       </select>
       </td>
       </tr>
       <tr>
        <td>
         <input type="button" name="cmdback" value="Back" onClick="history.go(-1)">
         <input type="reset" name="cmdreset" value="Reset">
        </td>
        <td align="center">
        <input type="submit" name="cmdsubmit" value="Search">
        </td>
       </tr>
       </table>
       </form>
       </center>
       <%
        RS.close
        myConn.close
       %>
       </body>
       </h




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net