I have a form that does some dynamic dropdowns based on the selection of dropdown above.
I would like to make the last dropdown "Build" a selection of checkboxes on another page.
Here is my code
<%@ Language = VBScript %>
<%Option Explicit%>
<%Response.Buffer = True%>
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0">
<TITLE></TITLE>
<%
dim strDataPath, strConnectString, objConnection, strRelease, strOS, strBuild, objRS, strSelected, oConn, oRs, MySQL, connect
strRelease = Request.Form("Release")
strOS = Request.Form("OS")
strBuild = Request.Form("Build")
'set oConn = Server.CreateObject("ADODB
.Connectio
n")
'strConnectString = "PROVIDER=Microsoft.Jet.OL
EDB.4.0;DA
TA SOURCE=" & Server.MapPath("fpdb\ptdb\
PVSdata.md
b") & ";Persist Security Info=False"
'oConn.Open connect
'set connection strings for entire application
'strDataPath = server.MapPath("fpdb\ptdb\
PVSdata.md
b")
strConnectString = "Provider=Microsoft.Jet.OL
EDB.4.0; DATA SOURCE= "& Server.MapPath("fpdb\ptdb\
PVSdata.md
b")
if not IsObject("ojbConnection") then
set objConnection=Server.Creat
eObject("A
DODB.Conne
ction")
objConnection.ConnectionTi
meout = 15
objConnection.CommandTimeo
ut = 10
objConnection.Mode = 3 'adModeReadWrite
if objConnection.state = 0 then
objConnection.Open strConnectString
end if
end if
sub makeCountry()
if not isObject("objRS") then
set objRS=Server.CreateObject(
"ADODB.Rec
ordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
objRS.Open "SELECT DISTINCT Release FROM SysInfo ORDER BY Release",objConnection,3,3
Response.Write("<option></
option>" & VBCRLF )
do while not objRS.EOF
if objRS("Release") = strRelease then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("Release") & "</option>" & VBCRLF )
objRS.MoveNext
loop
objRS.Close
set objRS=Nothing
end sub
sub makeRegion()
if strRelease <> "" then
if not isObject("objRS") then
set objRS=Server.CreateObject(
"ADODB.Rec
ordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
objRS.Open "SELECT DISTINCT OS FROM SysInfo WHERE Release = '" & strRelease & "' ORDER BY OS",objConnection,3,3
if objRS.eof then
Response.Write("<option>No
OS Found</option>")
else
Response.Write("<option>Se
lect OS Now</option>" & VBCRLF )
do while not objRS.EOF
if objRS("OS") = strOS then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("OS") & "</option>" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("<option>Se
lect a Release First</option>")
end if
end sub
sub makeCity()
if strOS <> "Select a Release First" AND strOS <> "Select OS Now" AND strOS <>"" then
if not isObject("objRS") then
set objRS=Server.CreateObject(
"ADODB.Rec
ordSet")
end if
if objRS.state <> 0 then
objRS.close
end if
objRS.Open "SELECT DISTINCT Build FROM SysInfo WHERE OS = '" & strOS & "' ORDER BY Build",objConnection,3,3
if objRS.eof then
Response.Write("<option>No
Builds Found</option>")
else
Response.Write("<option>Se
lect Build Now</option>" & VBCRLF )
do while not objRS.EOF
if objRS("Build") = strBuild then
strSelected = " Selected "
else
strSelected = ""
end if
Response.Write("<option" & strSelected & ">" & objRS("Build") & "</option>" & VBCRLF )
objRS.MoveNext
loop
end if
objRS.Close
set objRS=Nothing
else
Response.Write("<option>Se
lect an OS First</option>")
end if
end sub
%>
<SCRIPT LANGUAGE=javascript>
<!--
function submitCountry(){
var objForm = document.forms[0];
objForm.elements['OS'].sel
ectedIndex
=0;
objForm.elements['Build'].
selectedIn
dex = 0;
objForm.submit();
}
function submitRegion(){
var objForm = document.forms[0];
objForm.elements['Build'].
selectedIn
dex = 0;
objForm.submit();
}
function submitForm(){
var objForm = document.forms[0];
objForm.action = "
http://pysdoorway/scm/nebulous2.asp"
return true;
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM action="--WEBBOT-SELF--" method=POST id=form1 name=form1 onSubmit="return submitForm()">
<!--webbot bot="SaveResults" U-File="nebulous.asp" S-Format="HTML/BR" S-Label-Fields="TRUE" B-Reverse-Chronology="FALS
E" S-Email-Format="TEXT/PRE" S-Email-Address="teg@rmc.p
y.intel.co
m" B-Email-Label-Fields="TRUE
" S-Builtin-Fields startspan --><input TYPE="hidden" NAME="VTI-GROUP" VALUE="0"><!--webbot bot="SaveResults" i-checksum="43374" endspan -->
<p align="left"> </p>
<p align="center"><font size="6">  
; &nb
sp; Personal
Validation Test System<br>
</font><br>
&n
bsp;
<br>
</p>
<p align="center">  
; &nb
sp; &
nbsp; 
; &nb
sp;
<font color="#990033"><b>System Information<br>
<br>
</b></font><font size="5">  
; &nb
sp; &
nbsp; 
; &nb
sp; <
/font>Syst
em <f
ont size="5">
<select size="1" name="System"<%If Request("Dept")<>"" Then%>
value="<%=Request("Dept")%
>"
<%End If%>
>
<option><%=Request("System
")%></opti
on>
<option>pylnxdilsutPCI</op
tion>
<option>pylnxcpcisutcPCI</
option>
</select></font><body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000"><b> &
nbsp; 
; &nb
sp; </b> </p>
<p align="center">  
; &nb
sp; Release
<SELECT name="Release" onChange="submitCountry()"
>
<%call makeCountry%>
</SELECT> <br>
<br>
&n
bsp;
OS
<SELECT name="OS" onChange="submitRegion()">
<%call makeRegion%>
</SELECT><br>
<br>
Build Number
<SELECT name="Build">
<%call makeCity%>
</SELECT>  
; </p
>
<p align="center"><br>
<script language="javascript" type="text/javascript" src="datetimepicker.js">
//Date Time Picker script- by TengYong Ng of
http://www.rainforestnet.com//Script featured on JavaScript Kit (
http://www.javascriptkit.com)
//For this script, visit
http://www.javascriptkit.com </script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
</p>
<script language="javascript" type="text/javascript" src="datetimepicker.js">
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">
<p align="center"> </p>
<p align="center"> <br>
<font size="5">
<INPUT type="submit" value="Submit" id=submit1 name=submit1 style="border-style: inset; border-width: 1px"></font></p>
</FORM>
</BODY>
<%
objConnection.Close
set objConnection = Nothing
%>
</HTML>
Start Free Trial