Kiko has asked for the wisdom of the Perl Monks concerning the following question:
This form gets submited to a perl script that checks what the user clicked on then does somthing based on the value. Here is the way that i'm checking for the value:<input type="radio" name="radio_search" value="All_of_Intranet">All of + Intranet <input type="radio" name="radio_search" value="group_info">This Group
Unfortunately, this is not working. I think that i first need to check which of the two elements was checked then grab the value of the checked element. This i can do in javascript, but it would be easier and better if i can do it in Perl. Thanks for your help in advance.my $radio_search=param("radio_search"); if ($radio_search eq "All_of_Lehman") { &search_all(); } elsif ($radio_search eq "test") { &search_group(); } else { print "$radio_search - test<br>"; print "<br><font size=+2><b>Error:</b></font><br>"; print "<br> You need to specified if you want to search the entire + intranet or the current group"; print "<br><br><a href=javascript:history.go(-1)>Back</a>"; exit(); }
Edit Masem 2001-08-08 - Fixed typo in title
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do i chec a radio button in Perl?
by earthboundmisfit (Chaplain) on Aug 08, 2001 at 18:18 UTC | |
|
Debugging note
by Agermain (Scribe) on Aug 08, 2001 at 18:19 UTC | |
|
Re: How do i chec a radio button in Perl?
by Kiko (Scribe) on Aug 08, 2001 at 19:52 UTC | |
by earthboundmisfit (Chaplain) on Aug 08, 2001 at 20:08 UTC | |
by bladx (Chaplain) on Aug 08, 2001 at 21:23 UTC |