p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

proasp_codeclinic thread: Retrieving value from dropdown list


Message #1 by "Jennie Frizelle" <jfrizelle@d...> on Thu, 16 Jan 2003 11:17:51
Try doing

<a href="PO_Detail.asp" class="hoverDarkOrange8"
onClick="document.inventory.action='PO_Detail.asp';PO_List.Submit();">

also

if you are not sure if you are getting the vaiables or not always try a
"Get" then you can see them in the URL.

Let me know if this helps.

--
Tim Morford
HTTP://www.aspalliance.com/tmorford

-----Original Message-----
From: Jennie Frizelle [mailto:jfrizelle@d...]
Sent: Thursday, January 16, 2003 6:18 AM
To: Code Clinic
Subject: [proasp_codeclinic] Retrieving value from dropdown list


Hi

I am populating a dropdown list from an Access database - this is working
fine. However, when I call the following page and try to retrieve the
selected value in the dropdown list, it's blank. Here's my code :

First page :

<form name="PO_List" method="post" action="PO_Detail.asp">
<select name="slcPONumber">

<%
Dim strSQL, objRS

strSQL = "SELECT * FROM tbl_PO_Header"

Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, strConnect

Do while not objRS.EOF
%>

<option value="<%=objRS("SEHB_PO") %>"><%=objRS("SEHB_PO") %></option>

<% objRS.MoveNext
loop %>

</select>
<a href="PO_Detail.asp" class="hoverDarkOrange8">Go</a>
</form>


Second page :

<%
PO_Number = Request.Form("slcPONumber")

Response.write "PO_Number is " & PO_Number
%>

Thanks for any help.
Jennie.


  Return to Index