Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3rd try...receiving form field as select field

Status
Not open for further replies.

acmeweb

Programmer
Nov 21, 2003
9
0
0
US
if i have a select box in the first form with the values "bob", "jim" and "alice". the user selects "alice" and submits the form. the second asp page has a form which should have "alice" selected, but with the option to then change that selection to "bob" or "jim".

the reason i need the ability to make a change from the original selection is that the second form may not be called from the first page...it may be called from somewhere else within the website.

i have set up 2 pages; and with a sample, but cant get it to work.

if you have the answer, please give me an example. thank you.

this is what i have;
<%
FirstSelect = Request.Form(&quot;FirstName&quot;)
%>

<select name=<%=FirstSelect%> size=&quot;1&quot;>
<option>bob</option>
<option>jim</option>
<option>alice</option>
</select>

what am i missing?
 
On FormPass.asp
<select name=&quot;selName&quot; size=&quot;1&quot;>
<option value=&quot;bob&quot;>bob</option>
<option value=&quot;jim&quot;>jim</option>
<option value=&quot;alice&quot;>alice</option>
</select>


On FormAccept.asp
<%
selName=request.form(&quot;SelName&quot;)
%>
<select name=&quot;selName&quot; size=&quot;1&quot;>
<option value=&quot;bob&quot; <%IF SelName=&quot;bob&quot; then%>SELECTED<%end if%>>bob</option>
<option value=&quot;jim&quot; <%IF SelName=&quot;jim&quot; then%>SELECTED<%end if%>>jim</option>
<option value=&quot;alice&quot; <%IF SelName=&quot;alice&quot; then%>SELECTED<%end if%>>alice</option>
</select>
 
<%
FirstSelect = Request.Form(&quot;FirstName&quot;)
optStr = &quot;<option value=''>Choose One&quot;
do while not rs.eof
is rs(&quot;name&quot;) = FirstSelect then keyword = &quot;SELECTED&quot; else keyword = &quot;&quot;
optStr = optStr & &quot;<option value='&quot; & rs(&quot;name&quot;) & &quot;' '&quot; & keyword & &quot;>&quot; & rs(&quot;name&quot;)

%>

<select><%=optStr%></select>


Programming today is a race between software engineers striving to build better and bigger idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. - Rick Cook (No, I'm not Rick)

fart.gif
 
hey veep...you got it baby, been 2 weeks trying to get the correct answer from macromedia dreamweaver forum experts and 5 mins here and boy am i happy. this board is my only source from now on. i will be visiting here every day to answer any questions i can assist in. any help you may need in flash/fireworks or maybe just a correspondence, dont hesitate to email me.

again thank you sooooo much for your time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top