Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: Show / hide text field in cgi.pm application

by sflitman (Hermit)
on Jun 26, 2010 at 22:54 UTC ( #846735=note: print w/ replies, xml ) Need Help??


in reply to Show / hide text field in cgi.pm application

You need some javascript to do this. In your header include the following:

<script language='text/javascript'> var oText=document.getElementById('MyTextField'); function toggle_display(n) { if (n=='show') { oText.style.visibility='visible'; } else if (n=='hide') { oText.style.visibility='hidden'; } } </script>
And in your CGI.pm generated text fields, include properties
for the controlling field: onchange=>'toggle_display(this.value)' for MyTextField: id=>'MyTextField'
It's really more of a javascript/css problem, but it can be solved within the CGI.pm framework.

HTH,
SSF


Comment on Re: Show / hide text field in cgi.pm application
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://846735]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (14)
As of 2014-12-22 22:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (132 votes), past polls