Click to See Complete Forum and Search --> : How can I make selected a radio button based a value passed by an other form


mpoincare
January 12th, 2003, 08:18 PM
I have 3 radio buttons on a web page. I would like to have a vbscript sample of how can I make selected either one of them based on a value passed by an other form.

I also have the same request for a dropdown list box. I would like to make selected the option from the list based on a value passed by an other form.

mwilliamson
January 12th, 2003, 09:15 PM
You should probably store is somewhere, either in your session object or in a hidden object on the html page.

columbus2003
January 12th, 2003, 11:40 PM
1)Which language you used for server-side. The following is ASP sample code

-----------------------------------------------------------------------------
<SELECT NAME = "MyOptions" >
<Option VALUE = "Option1" <%if varOptServer = "1" then%> SELECTED <%end if%>> Option 1
<Option VALUE = "Option2" <%if varOptServer = "2" then%> SELECTED <%end if%>> Option 2
<Option VALUE = "Option3" <%if varOptServer = "3" then %>SELECTED <%end if%>> Option 3
</SELECT>
-----------------------------------------------------------------------------

2)If you want to use client-side only, In OnSubmit function of you form, write some coding to changing selection of your radio buttons on the other page. (Use DOM(Document Object Modal))