Forum Moderators: open

Message Too Old, No Replies

Radio button on form

could go 2 ways

         

ganderla

10:53 pm on Dec 31, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have a neat little form that I would like to do something fun.

I have 2 questions on the form, eash of them have a yes or a no radio button.
Is there a way that:
If they are both no's goto one page, if either of them are yes (does not matter which one) they go to a different page?

Thank you

jatar_k

10:59 pm on Dec 31, 2003 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



I believe you could use a js function to check the values of the two buttons and then change the form action then submit it

document.formname.action = 'somefile.php';

Purple Martin

11:56 pm on Jan 1, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, that would work as a client-side solution as long as their browser has JavaScript turned on. You could also do it with some simple server-side script to redirect, which would always work.