CGI - Hidden Fields (NS4.7/IE5)
Paul Boddie
paulb at infercor.no
Tue Mar 21 05:06:37 EST 2000
Tamer Fahmy wrote:
>
> Tamer Fahmy wrote:
> >
> > I have got a strange problem with my CGI-script. If I call my
> > page from Netscape through Apache I get all hidden Fields and
> > values. But if I instead call it from Internet Explorer 5 the
> > hidden fields don't show up in my FieldStorage.
[...]
> I finally found out how to solve the problem. If I use get instead of
> post and add a value=" " expression to the hidden fields Internet
> Exploder starts to provide the hidden fields.
> i.e. <input type="hidden" name="EXPIRED" value=" ">
>
> Still I don't have any idea why! Maybe a buggy Internet Exploder
> as usual?
I didn't realise what the problem was straight away, but what you probably want
to do is this:
form = cgi.FieldStorage(keep_blank_values=1)
Where 'form' is the object you might use to read the values from the submitted
form. The problem is that without the 'keep_blank_values' option set, the
'FieldStorage' object discards "empty" values.
Paul
More information about the Python-list
mailing list