Hey all,
I've created some dynamic Listboxes that are like this
Box1
Box2
Box3
The page fills Box2 with the selection from box1...
I want to be able to click a submit button and have a page test.asp pop up with hidden fields of the selection from Box1 and Box2. I've created the post function form, I am having problems with getting the hidden fields to populate with the selections.
I also want Box3 to populate with the selection from Box2.
Any help would be appreciated. I use Dreamweaver if that makes things any easier.
This is what I have so far on test.asp (the page that the first one posts to)
Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="Connections/ProtoUcamara.asp" -->
<%
Dim rsGenus1__MMColParam
rsGenus1__MMColParam = "1"
If (Request.QueryString("Family") <> "") Then
rsGenus1__MMColParam = Request.QueryString("Family")
End If
%>
<%
Dim rsGenus1
Dim rsGenus1_numRows
Set rsGenus1 = Server.CreateObject("ADODB.Recordset")
rsGenus1.ActiveConnection = MM_ProtoUcamara_STRING
rsGenus1.Source = "SELECT Genus, Family FROM Master WHERE Family = '" + Replace(rsGenus1__MMColParam, "'", "''") + "' ORDER BY Genus ASC"
rsGenus1.CursorType = 0
rsGenus1.CursorLocation = 2
rsGenus1.LockType = 1
rsGenus1.Open()
rsGenus1_numRows = 0
%>
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("family") <> "") Then
Recordset1__MMColParam = Request.Form("family")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows
Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_ProtoUcamara_STRING
Recordset1.Source = "SELECT * FROM Family WHERE Labels = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()
Recordset1_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
</head>
<body>
<form action="" method="post" name="GenusSpec" id="GenusSpec">
<p>
<input name="hiddenField" type="hidden" value="<%=(Recordset1.Fields.Item("Labels").Value)%>">
</p>
<p> </p>
<p>
<select name="select">
<%
While (NOT rsGenus1.EOF)
%>
<option value="<%=(rsGenus1.Fields.Item("RelationGenus").Value)%>"><%=(rsGenus1.Fields.Item("Labels").Value)%></option>
<%
rsGenus1.MoveNext()
Wend
If (rsGenus1.CursorType > 0) Then
rsGenus1.MoveFirst
Else
rsGenus1.Requery
End If
%>
</select>
Genus
</p>
</form>
</body>
</html>
<%
rsGenus1.Close()
Set rsGenus1 = Nothing
%>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>