Ask a Question related to PERL Modules, Design and Development.
-
Bernard Cosell #1
Turning *OFF* form-vble copying in CGI.pm
Is there some way to turn *OFF* the machinery in CGI.pm that
automatically forces form variables to take their values from the
incoming CGI request rather than what you *tell* it in your program?
I know about "override => 1", but I find it both annoying and a waste
of space to do that scores of times [since as far as I know (over many
years of using CGI.pm in quite a lot of CGI programs], I have *NEVER*
wanted it to blindly/auotmatically copy the values from old-form =>
new form, so I need to put the 'override' onto _every_ form tag;
UGH!].
Can I somehow specify a global-default-value for override? I looked
in the very latest docs on Lincoln's website and for even the very
latest version [which we're NOT running], it still says:
So I think I'm out of luck [and I obviously must be thinking about>>>The default values that you specify for the forms are only used the
>>>first time the script is invoked. If there are already values present
>>>in the query string, they are used, even if blank.
CGI-matters in the wrong way, because the auto-value-copying has
*always* struck me as the wrong thing to do, but obviously a fair
number of folk like it and/or use it, else I suspect there'd long
since have been a flag to set the default to override=>0.] Oh well...
/Bernie\
Bernard Cosell Guest
-
Form fields rotate after copying/pasting
Why would this be a feature request? The ability to replace pages in forms is an established feature. The fact that this doesn't work in landscape... -
Turning off audio?
Is there any way to turn off the audio on a game? I was playing around with the game at http://www.bubblebox.com/game/adventure/91.htm , and I'd... -
Turning a file into an ad
Hi there I really need some beginner help. I need to turn this file http://www.thefightmusic.com/f/header3.swf Into a 468*60 banner ad. Basically... -
THOSE OTF FONTS: TURNING 'EM OFF
OS 10.2.8 / dual 1-gHz / Illustrator CS: I normally use Suitcase (X1) to manage my fonts. I remove all extraneous fonts and keep them in a central... -
turning off 3D animation?
Hello Martin, 1. There is a way by code to stop all animations before your movie starts. In a movie script, place the following code: on... -
Alan J. Flavell #2
Re: Turning *OFF* form-vble copying in CGI.pm
On Fri, 9 Jan 2004, Bernard Cosell wrote:
Are you looking for [url]http://stein.cshl.org/WWW/software/CGI/[/url] and> Is there some way to turn *OFF* the machinery in CGI.pm that
> automatically forces form variables to take their values from the
> incoming CGI request rather than what you *tell* it in your program?
its documentation of the -nosticky pragma?
Alan J. Flavell Guest
-
Juha Laiho #3
Re: Turning *OFF* form-vble copying in CGI.pm
Bernard Cosell <bernie@rev.net> said:
Doesn't this do the trick (from CGI documentation, didn't test but seems>Is there some way to turn *OFF* the machinery in CGI.pm that
>automatically forces form variables to take their values from the
>incoming CGI request rather than what you *tell* it in your program?
to be what you want):
To create an empty query, initialize it from an empty
string or hash:
$empty_query = new CGI("");
-or-
$empty_query = new CGI({});
--
Wolf a.k.a. Juha Laiho Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)
Juha Laiho Guest
-
Bernard Cosell #4
Re: Turning *OFF* form-vble copying in CGI.pm
On Fri, 09 Jan 2004 12:43:37 -0500, Bernard Cosell <bernie@rev.net>
wrote:
I've found a fairly comfortable way to deal with this, so I'm probably>Is there some way to turn *OFF* the machinery in CGI.pm that
>automatically forces form variables to take their values from the
>incoming CGI request rather than what you *tell* it in your program?
a reasonably-happy-camper at the moment: I've just stuck in a
"$cgi->delete_all()" right before I start generating the outgoing
form. I've already copied all the form vbls I care about to 'my'
vbls, so making all that detritus that I didn't care about anyway just
go away entirely works for me....
/Bernie\
Bernard Cosell Guest
-
Bernie Cosell #5
Re: Turning *OFF* form-vble copying in CGI.pm
"Alan J. Flavell" <flavell@ph.gla.ac.uk> wrote:
} On Fri, 9 Jan 2004, Bernard Cosell wrote:
}
} > Is there some way to turn *OFF* the machinery in CGI.pm that
} > automatically forces form variables to take their values from the
} > incoming CGI request rather than what you *tell* it in your program?
}
} Are you looking for [url]http://stein.cshl.org/WWW/software/CGI/[/url] and
} its documentation of the -nosticky pragma?
Indeed I was -- I'd been through the docs looking for such a thing, but I
didn't see that [the usual problem with docs: if you don't know where to
look, it is hard/impossible to find what you're looking for].
Note that from the *very* doc URL you referenced above, it says:
Notice, no mention of '-nosticky', and hence my inquiry... but now I know!>>> If you want to change the value of a field from its previous value, you have two choices:
>>>
>>> call the param() method to set it.
>>> use the -override (alias -force) parameter. (This is a new feature in 2.15) This forces
>>> the default value to be used, regardless of the previous value of the field:
>>> print $query->textfield(-name=>'favorite_color',
>>> -default=>'red',
>>> -override=>1);
>>>
>>> If you want to reset all fields to their defaults, you can:
>>> Create a special defaults button using the defaults() method.
>>> Create a hypertext link that calls your script without any parameters.
THANKS!!
/Bernie\
--
Bernie Cosell Fantasy Farm Fibers
[email]bernie@fantasyfarm.com[/email] Pearisburg, VA
--> Too many people, too few sheep <--
Bernie Cosell Guest
-
Alan J. Flavell #6
Re: Turning *OFF* form-vble copying in CGI.pm
On Sat, 10 Jan 2004, Bernie Cosell wrote:
[...]> Note that from the *very* doc URL you referenced above, it says:Feel free to email the author! He's not unaccustomed to getting>> >>> If you want to reset all fields to their defaults, you can:
> >>> Create a special defaults button using the defaults() method.
> >>> Create a hypertext link that calls your script without any parameters.
> Notice, no mention of '-nosticky', and hence my inquiry... but now I know!
occasional stroppy comments from me ;-)
all the best
Alan J. Flavell Guest



Reply With Quote

