Any idea what I am doing wrong, any help is apprieciated.
Thanks,
Randy
Re: Easy question - Trouble with Request.Form
am 04.04.2007 19:01:10 von marc
"Rabel" wrote in message
news:1175704239.315081.13920@w1g2000hsg.googlegroups.com...
>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.
>
>
>
> 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.
>
> " >
> width="45" height="18" border="0">
>
> Any idea what I am doing wrong, any help is apprieciated.
>
> Thanks,
> Randy
I think you want to try javascript for that but...
<%
Response.Redirect(Request.Form("selecter"))
%>
Re: Easy question - Trouble with Request.Form
am 04.04.2007 19:08:40 von marc
"Marc" wrote in message
news:eTiFrttdHHA.4468@TK2MSFTNGP03.phx.gbl...
> "Rabel" wrote in message
> news:1175704239.315081.13920@w1g2000hsg.googlegroups.com...
>>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.
>>
>>
>>
>> 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.
>>
>> " >
>> width="45" height="18" border="0">
>>
>> Any idea what I am doing wrong, any help is apprieciated.
>>
>> Thanks,
>> Randy
>
> I think you want to try javascript for that but...
>
>
> <%
> Response.Redirect(Request.Form("selecter"))
> %>
>
I can't help myself:
Make sure the "onchange" bit until the ">" is on one line!
Re: Easy question - Trouble with Request.Form
am 04.04.2007 20:16:50 von Rabel
On Apr 4, 1:08 pm, "Marc" wrote:
> "Marc" wrote in message
>
> news:eTiFrttdHHA.4468@TK2MSFTNGP03.phx.gbl...
>
>
>
> > "Rabel" wrote in message
> >news:1175704239.315081.13920@w1g2000hsg.googlegroups.com...
> >>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.
>
> >>
>
> >> 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.
>
> >> " >
> >> width=3D"45" height=3D"18" border=3D"0">
>
> >> Any idea what I am doing wrong, any help is apprieciated.
>
> >> Thanks,
> >> Randy
>
> > I think you want to try javascript for that but...
>
> > <%
> > Response.Redirect(Request.Form("selecter"))
> > %>
>
> I can't help myself:
>
>
> onchange=3D"if(this.selectedIndex>0)document.location.href=3 Dthis.options=
[this.=ADselectedIndex].value">
>
>
>
>
>
>
> Make sure the "onchange" bit until the ">" is on one line!- Hide quoted t=
ext -
>
> - 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
Re: Easy question - Trouble with Request.Form
am 04.04.2007 21:02:20 von Jon Paal
You need to have a default value for your link until the user makes a selection
and
-- you either need an autopostabck on your selector which will then change the link value
or
-- you need to use javascript to change the link value based upon the user selection.
"Rabel" wrote in message news:1175704239.315081.13920@w1g2000hsg.googlegroups.com...
>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.
>
>
>
> 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.
>
> " >
> width="45" height="18" border="0">
>
> Any idea what I am doing wrong, any help is apprieciated.
>
> Thanks,
> Randy
>
Re: Easy question - Trouble with Request.Form
am 04.04.2007 21:32:05 von Rabel
On Apr 4, 3:02 pm, "Jon Paal [MSMD]"
com> wrote:
> You need to have a default value for your link until the user makes a selection
>
> and
>
> -- you either need an autopostabck on your selector which will then change the link value
>
> or
>
> -- you need to use javascript to change the link value based upon the user selection.
>
>
>
> "Rabel" wrote in messagenews:1175704239.315081.13920@w1g2000hsg.googlegroups. com...
> >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.
>
> >
>
> > 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.
>
> > " >
> > width="45" height="18" border="0">
>
> > Any idea what I am doing wrong, any help is apprieciated.
>
> > Thanks,
> > Randy- Hide quoted text -
>
> - Show quoted text -
Thanks Jon but I dont really understand what you mean - I think that
you are describing Marc's js version which I am using but I would
still like to have a button make it go to the next page, not just when
you select a option in the dropdown box.
Re: Easy question - Trouble with Request.Form
am 04.04.2007 22:10:00 von Tim Slattery
"Rabel" wrote:
>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.
>
>
>
>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.
>
>" >
>width="45" height="18" border="0">
Looks OK at a glance. In order to use Request.Form, your form has to
have been POSTed, you cannot use method="get" if you're going to use
that. If you want that link to be in the same page as the select
group, then you have to rethink what you're doing. ASP is a
server-side platform, and the <%= tag in the
work unless the form has been submitted and you're building a new
page.
It can be done in the same page, but it's done using client-side
Javascript (use a handler for the onChange event in the select group).
That being the case, it's off-topic in this group.
--
Tim Slattery
MS MVP(DTS)
Slattery_T@bls.gov
http://members.cox.net/slatteryt
Re: Easy question - Trouble with Request.Form
am 04.04.2007 22:34:33 von Jon Paal
I guess it's not clear what you are trying to accomplish.
if you want the dropdownlist to send the user to another page, then on the post back, use
if len(Request.Form("selecter")) > 0 then
Response.Redirect(Request.Form("selecter"))
end if
if you want to populate the clientside anchor to give the user a button, then use javascript to get the selected value from the
dropdownlist through the onchange event.
"Rabel" wrote in message news:1175715124.993807.196670@n59g2000hsh.googlegroups.com.. .
> On Apr 4, 3:02 pm, "Jon Paal [MSMD]"
> com> wrote:
>> You need to have a default value for your link until the user makes a selection
>>
>> and
>>
>> -- you either need an autopostabck on your selector which will then change the link value
>>
>> or
>>
>> -- you need to use javascript to change the link value based upon the user selection.
>>
>>
>>
>> "Rabel" wrote in messagenews:1175704239.315081.13920@w1g2000hsg.googlegroups. com...
>> >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.
>>
>> >
>>
>> > 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.
>>
>> > " >
>> > width="45" height="18" border="0">
>>
>> > Any idea what I am doing wrong, any help is apprieciated.
>>
>> > Thanks,
>> > Randy- Hide quoted text -
>>
>> - Show quoted text -
>
> Thanks Jon but I dont really understand what you mean - I think that
> you are describing Marc's js version which I am using but I would
> still like to have a button make it go to the next page, not just when
> you select a option in the dropdown box.
>
Re: Easy question - Trouble with Request.Form
am 04.04.2007 23:30:38 von marc
"Rabel" wrote in message
news:1175710610.233675.300500@w1g2000hsg.googlegroups.com...
On Apr 4, 1:08 pm, "Marc" wrote:
> "Marc" wrote in message
>
> news:eTiFrttdHHA.4468@TK2MSFTNGP03.phx.gbl...
>
>
>
> > "Rabel" wrote in message
> >news:1175704239.315081.13920@w1g2000hsg.googlegroups.com...
> >>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.
>
> >>
>
> >> 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.
>
> >> " >
> >> width="45" height="18" border="0">
>
> >> Any idea what I am doing wrong, any help is apprieciated.
>
> >> Thanks,
> >> Randy
>
> > I think you want to try javascript for that but...
>
> > <%
> > Response.Redirect(Request.Form("selecter"))
> > %>
>
> I can't help myself:
>
>
> onchange="if(this.selectedIndex>0)document.location.href=thi s.options[this.selectedIndex].value">
>
>
>
>
>
>
> 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.