Re: cgi popup_menu when radio is selected
by Popcorn Dave (Abbot) on Feb 04, 2008 at 20:37 UTC
|
Is there some reason you don't want to use JavaScript? If you don't use JS, then probably your only other option is AJAX. You might have a look at CGI::Ajax or some of the other Ajax modules on CPAN if that doesn't fit the bill.
Revolution. Today, 3 O'Clock. Meet behind the monkey bars.
I would love to change the world, but they won't give me the source code
| [reply] |
|
Just an opposite. I have nothing against js. If it's not too complicated for you may I ask you at least roughly to show how to use it for this case.
| [reply] |
|
| [reply] |
|
As someone else recently (and wisely) observed,
"Drop a coin in the COC (Crank Out Code) machine."
Or, on your own, read up on js and or the modules suggested above.
| [reply] |
|
|
Re: cgi popup_menu when radio is selected
by bradcathey (Prior) on Feb 05, 2008 at 03:32 UTC
|
I'd do this on the client side with a little onclick to show the select tag. I do this a lot and it has nothing to do with Perl.
<input type="radio" value="1" name="foobar" />
<input type="radio" value="2" name="foobar" onclick="document.getEleme
+ntById('menu').style.visibility='visible'" />
<select name="somechoice" id="menu" style="visibility: hidden">
etc.
You could use display: none and display: block, the difference being display will collapse the space on the page where the menu would go.
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
| [reply] [d/l] [select] |
|
Thanks a lot, it works fine. The only thing is that when I check another radio button select with this id="menue" should disapear.
If you could give me a hint how to do this I would appreciate.
| [reply] |
|
<input type="radio" value="1" name="foobar" onclick="document.getEleme
+ntById('menu').style.visibility='hidden'" />
—Brad "The important work of moving the world forward does not wait to be done by perfect men." George Eliot
| [reply] [d/l] |
Re: cgi popup_menu when radio is selected
by Anonymous Monk on Feb 04, 2008 at 19:36 UTC
|
Hi. You will need to get the value passed in from the request and use it to supply which radio button should be checked. Tell us more and we can help you better. | [reply] |
|
I want it to be a dynamic page, so that request is not sent yet. And when XXX is checked
<input type="radio" name="rad_server_type" value="xml">XXX;
<input type="radio" name="rad_server_type" value="org">YYY;
then this should be shown:
print $q->popup_menu(-name=>'xml_server',-values=> \@array_of_selecti
+ons);
otherwise not. Something like "on....event" javascript
| [reply] [d/l] [select] |