Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I have a FORM that sends a variety of hidden INPUT types to a POST script. I use some javascript code to manipulate the INPUT types (on or off) based on which radio button is selected. Is it possible to do this in perl, i.e., use an onfocus() handler to run a perl script to set the INPUT types on or off and have the correct POST data sent when the FORM is submitted? It submits to a perl script. I want to get away from javascript but can't seem to get perl to do what I want. Pre-Monk seeking wisdom.

Replies are listed 'Best First'.
Re: FORM handler
by cfreak (Chaplain) on Jun 07, 2002 at 19:36 UTC

    All of your Perl is server-side so you want get the instant change that you are looking for without the Javascript. (You can't do onFocus() without Javascript).

    Without more information I can't really be much help. You might want to rethink the design of your program. Maybe you had some settings your user could choose from and then they go to another screen with some more settings. You can print out the new hidden inputs the way you need them. Sort of like a wizard thing or something. I hope that makes sense.

    Chris

    Some clever or funny quote here.