Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: CGI.pm: How to Stop Maintaining State

by chipmunk (Parson)
on Sep 04, 2001 at 17:56 UTC ( [id://110033]=note: print w/replies, xml ) Need Help??


in reply to CGI.pm: How to Stop Maintaining State

Another way to handle this issue is the approach described in the documentation for CGI:
Note, that just like all the other form elements, the value of a hidden field is "sticky". If you want to replace a hidden field with some other values after the script has been called once you'll have to do it manually: $query->param('hidden_name','new','values','here');
I was surprised by this behavior myself when I first encountered it, but now that I'm aware of it it's very useful. In fact, the stickiness of form elements is one of my favorite features of CGI.pm, because making your form elements sticky is a big pain when you're writing the HTML yourself.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (2)
As of 2024-04-25 05:39 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found