Question
Reference Form Field Value for URL
This is an easy one, I know. But the few things I've tried
haven't worked.
I have a form with a List/Menu and a button. The field is a list of Instruments:
<td class="Text"><select name="Instrument" class="Text" id="Instrument">
<option value="Acoustic Guitar" selected="selected">Acoustic Guitar</option>
<option value="Bass Guitar">Bass Guitar</option>
<option value="Drums">Drums</option>
<option value="Electric Guitar">Electric Guitar</option>
<option value="Harmonica">Harmonica</option>
<option value="Keys">Keys</option>
<option value="Mandolin">Mandolin</option>
<option value="Other">Other</option>
<option value="Percussion">Percussion</option>
<option value="Piano">Piano</option>
<option value="Violin">Violin</option>
<option value="Vocal">Vocal</option>
</select></td>
When the user clicks the button to submit the form (named form2), I have the button sending the user to another page. I need the URL to have the selected value from the list as the last parameter. I have:
<form id="form2" name="form2" method="post" action="AddMusician.asp?eventid=<%=EventInfo("EventID")%>&Instrument=<%Response.Form("Instrument")%>" />
And everything works except the Response.Form command. The button works, the URL appears with nothing after the Instrument=. I also tried setting the field to a variable (strInstrument) and using this:
<%
Dim strInstrument
strInstrument = Request.Form("Instrument")
%>
<form id="form2" name="form2" method="post" action="AddMusician.asp?eventid=<%=EventInfo("EventID")%>&Instrument=<%Response.Write strInstrument%>" />
Thanks for your help.
Rob
I have a form with a List/Menu and a button. The field is a list of Instruments:
<td class="Text"><select name="Instrument" class="Text" id="Instrument">
<option value="Acoustic Guitar" selected="selected">Acoustic Guitar</option>
<option value="Bass Guitar">Bass Guitar</option>
<option value="Drums">Drums</option>
<option value="Electric Guitar">Electric Guitar</option>
<option value="Harmonica">Harmonica</option>
<option value="Keys">Keys</option>
<option value="Mandolin">Mandolin</option>
<option value="Other">Other</option>
<option value="Percussion">Percussion</option>
<option value="Piano">Piano</option>
<option value="Violin">Violin</option>
<option value="Vocal">Vocal</option>
</select></td>
When the user clicks the button to submit the form (named form2), I have the button sending the user to another page. I need the URL to have the selected value from the list as the last parameter. I have:
<form id="form2" name="form2" method="post" action="AddMusician.asp?eventid=<%=EventInfo("EventID")%>&Instrument=<%Response.Form("Instrument")%>" />
And everything works except the Response.Form command. The button works, the URL appears with nothing after the Instrument=. I also tried setting the field to a variable (strInstrument) and using this:
<%
Dim strInstrument
strInstrument = Request.Form("Instrument")
%>
<form id="form2" name="form2" method="post" action="AddMusician.asp?eventid=<%=EventInfo("EventID")%>&Instrument=<%Response.Write strInstrument%>" />
Thanks for your help.
Rob
