|
Mike Looijmans
nlv11281 at natlab.research.philips.com
Tue Jan 3 08:15:39 EST 2006
Sounds like normal HTML behaviour - a DISABLED input does not post its
data to the server.
To avoid an exception when the form field is not there, use
form.get(..), form.has_key(..) or just catch the KeyError and handle it.
--
Mike Looijmans
Philips Natlab / Topic Automation
python eager wrote:
> Hi
> I am using .psp page, and the values are passed into .py. I am unable
> to get only one value from text box. In that text box has disabled field.
>
> The code is as below for .psp
>
> <input type="text" name="salary" size ="10" /> This text
> box disabled using javascript while loading.
>
> The code is as below for .py
> self.writeln("Salary :")
> self.writeln(req.field('salary'))
>
> if i remove the disabled option for this text box i will get the answer.
> But if the disabled opiton is enabled i will get the following error ;
>
> self.writeln(req.field('salary'))
> File ".\WebKit\HTTPRequest.py", line 202, in field [edit]
> <http://localhost:8080/Admin/EditFile?filename=C%3A%5CWebware-0.9%5CWebKit%5C.%5CWebKit%5CHTTPRequest.py&line=202>
> KeyError: 'salary'
>
>
> please give the solution for this.
>
> Thanks
> Python Eager
>
>
> ------------------------------------------------------------------------
> Yahoo! DSL
> <http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=37474/*http://promo.yahoo.com/broadband/
> > Something to write home about. Just $16.99/mo. or less
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
|