Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: Cannot clear cgi param (if it's really what I need to do)

by lepetitalbert (Monsignor)
on Jan 31, 2008 at 09:33 UTC ( #665310=note: print w/replies, xml ) Need Help??


in reply to Re^3: Cannot clear cgi param (if it's really what I need to do)
in thread Cannot clear cgi param (if it's really what I need to do)

Hi kyle,

As I print other hidden params

print hidden( 'day' , $day );

I printed this one

print hidden( 'mode' , 'save' , 1 );

and this don't work.

print hidden( -name => 'mode' , -default => 'save' , -override => 1);

works, but I don't understand why ?

Have a nice day.

"There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Replies are listed 'Best First'.
Re^5: Cannot clear cgi param (if it's really what I need to do)
by ikegami (Pope) on Jan 31, 2008 at 10:16 UTC
    When you don't use the named parameter style, the first argument is the field name and the rest are values for the field.
    print hidden( 'mode' , 'save' , 1 );
    is short for
    print hidden( -name => 'mode' , -default => [ 'save', 1 ]);

      Hi ikegami,

      Thank you for the explanation.

      Have a nice day.

      "There is only one good, namely knowledge, and only one evil, namely ignorance." Socrates

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://665310]
help
Chatterbox?
[LanX]: strangely you can't disable the XP nodelet
[LanX]: But you can use CSS to hide it
[LanX]: and disoplay the data permanently in your peronal nodelet
[marinersk]: I saw that you could post it on the Personal Nodelet, but you have to provide the content also. No way to auto-populate it. Not that this would solve my distraction problem...
[LanX]: there are template variables to "Auto-populate" it
[marinersk]: Yeah, someday I might become interested enough to poke around PerlMonks more internally. Most of the fancy stuff is way down on my to do list.
[LanX]: Yeah ...
[LanX]: no variable for votes_left
[marinersk]: Ah, well. I will continue to deal with it, as I have. Thanks for poking about, though.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (7)
As of 2017-05-29 14:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?