I am trying to create some functionality on my website. The page is written in Perl/CGI. I have a drop down box that gets loaded with values from a database. This works fine.
When a user selects an item from the dropdown box, I want the onSelect function to perform the following function:
-IF the option selected contains a certain string THEN enable a set of radio buttons on the page
-IF the option selected does not contain a certain string THEN disable a set of radio buttons on the page
I can easily create code in PERL to check for the string, and I can easily create javascript to enable and disable the radio buttons. However, I do not know the best way to merge the two. I'm hoping that maybe I can just call a Perl subroutine from the onSelect function, which will do the checking AND disable/enable the radio buttons.
If so, how can this be done. If not, what other options may I have?
Thanks!
When a user selects an item from the dropdown box, I want the onSelect function to perform the following function:
-IF the option selected contains a certain string THEN enable a set of radio buttons on the page
-IF the option selected does not contain a certain string THEN disable a set of radio buttons on the page
I can easily create code in PERL to check for the string, and I can easily create javascript to enable and disable the radio buttons. However, I do not know the best way to merge the two. I'm hoping that maybe I can just call a Perl subroutine from the onSelect function, which will do the checking AND disable/enable the radio buttons.
If so, how can this be done. If not, what other options may I have?
Thanks!