"Rabel" <Randy@Creativeness.comwrote in message
news:1175710610.233675.300500@w1g2000hsg.googlegro ups.com...
On Apr 4, 1:08 pm, "Marc" <sorry...@dirtymail.comwrote:
Quote:
"Marc" <sorry...@dirtymail.comwrote in message
>
news:eTiFrttdHHA.4468@TK2MSFTNGP03.phx.gbl...
>
>
>
Quote:
"Rabel" <R...@Creativeness.comwrote in message
news:1175704239.315081.13920@w1g2000hsg.googlegrou ps.com...
Quote:
>I am new to asp and I am having a little trouble with the Request.form
option. What I want to do is I have a dropdown box.
>
Quote:
Quote:
<select name="selecter" class="text" id="selecter">
<option value="page1.htm" selected>Page 1</option>
<option value="page2.htm">Page 2</option>
<option value="page3.htm">Page 3</option>
</select>
>
Quote:
Quote:
and I want to use a button that then will take you to the page you
selected so I have been trying codes like this.
>
Quote:
Quote:
<a href="<%= Request.Form("selecter") %>" ><img src="submit.jpg"
width="45" height="18" border="0"></a>
>
Quote:
Quote:
Any idea what I am doing wrong, any help is apprieciated.
>
>
Quote:
I think you want to try javascript for that but...
>
Quote:
<%
Response.Redirect(Request.Form("selecter"))
%>
>
I can't help myself:
>
<select name="selecter" class="text" id="selecter"
onchange="if(this.selectedIndex>0)document.locatio n.href=this.options[this.*selectedIndex].value">
<option value="" selected>Select page</option>
<option value="page1.htm">Page 1</option>
<option value="page2.htm">Page 2</option>
<option value="page3.htm">Page 3</option>
</select>
>
Make sure the "onchange" bit until the ">" is on one line!- Hide quoted
text -
>
- Show quoted text -
Thanks Marc - but is there a way that I can still use a button then
just when you select from the box.
Thanks
sure, but remember... this isn't a javascript group.
<form name="frm">
<select name="selecter" class="text" id="selecter">
<option value="page1.htm">Page 1</option>
<option value="page2.htm">Page 2</option>
<option value="page3.htm">Page 3</option>
</select>
<input type="button" value="go there"
onclick="document.location.href=document.frm.selec ter.options[document.frm.selecter.selectedIndex].value"
/>
</form>