Hi all! How can i do this: <form method="get" action="test.asp" > <input name="boys" type=radio value="John">John <input name="boys" type=radio value="Lu">Lu <input name="boys" type=radio value="James">James <input name="student" type=checkbox value="yes">student? and now: if student="yes" then this boy is a student: <input type=hidden name="message1" value="he is a student"> <input type=hidden name="message2" value="welcome"> or if student not "yes" this boy is not a student: <input type=hidden name="message1" value="who is it"> <input type=hidden name="message2" value="bye"> <input type="submit" value="Ок"> </form> Thanks
This doesn't seem the best way to do it since you're changing hidden values. Simply alter your receiving script to create the values if it detects "yes" or "no". Doing it with Javascript (which is what you'd need to do it on the page without reloading) is a waste if the values are hidden. For example, if your receiving script is in PHP, it'd be something like this: if (isset($_POST['student'])) { $msg1 = "he is a student"; $msg2 = "welcome"; } else { $msg1 = "who is it"; $msg2 = "bye"; } Code (markup): Similar code can be used for Perl/CGI ... I just don't know what it is