Forum Moderators: phranque

Message Too Old, No Replies

radio buttons with html and ASP

         

NotAFanOfPrograming

6:25 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



I am sure there is a simple solution to solve this but my brain is fried right now so I seek the help of others...
anyway my problem is that I have a form on an HTML page with some radio buttons, 3 different groups to be exact.

The user fills out the form and then hits submit.

The submit buttons calls an ASP page where the asp page is too look exactly like the HTML form they just filled out but with all form elements 'readonly', so they cannot change anything. That is not the important part, the readonly i know how to do.

What I cannot get it how to take the "on state" of one of the radio button groups, pass it to the asp page and have the same radio button be checked when the rest of the variables fall into place and the ASP page finishes loading. So Basically i want the ASP page to look exactly like the HTML page when the user has filled everything out. So say if one group has two radio buttons, one i want one checked and the other i want disabled.

Is this possible? I would like to do it through VBscript but is JS is the way to go i'm down.

Thanks

Iguana

7:03 pm on Aug 4, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to use your ASP script like this
<%If sGroup1 = "rad1" Then%>
<INPUT type="radio" value="rad1" checked/>
<%Else%>
<INPUT type="radio" value="rad1"/>
<%End If%>

and do that for each radio button.

It's a bit long winded.

NotAFanOfPrograming

7:23 pm on Aug 4, 2004 (gmt 0)

10+ Year Member



awesome, thanks a ton!