>>>>> "AB" == Alex Brelsfoard <[EMAIL PROTECTED]> writes:
AB> OK, so I figured out, the hard way, a while ago that when you submit a AB> form with a checkbox or radio button with nothing checked, said checkbox AB> or radio button's field name does NOT get sent, via the browser, to my AB> perl script. It's as if it does not exist. AB> Is there a way to guarantee that the field names will be passed to my AB> script? The following ideas are options I would _not_ like to follow if AB> possible: AB> - set a default checkbox or redio button (so something is always filled AB> in). - use a hidden field to list of all the fields in the form. AB> - have the perl script read the HTML code from the page and make its own AB> list. AB> - javascript you should never trust the browser to do anything as a fake browser can be made with LWP (or other tools) and submit anything. so your form handling script should know what fields to expect and use a default value for any unset radio buttons. this is related to the common falacy of using javascript for data validation which leads to dropping that from the server. this defaulting is just part of proper data validation that web servers must do. as for how your code will know what fields to validate, that is another question. parsing the html seems like a very clumsy way to me. why would your html have its fields changed and your code doesn't get changed? uri -- Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com --Perl Consulting, Stem Development, Systems Architecture, Design and Coding- Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org _______________________________________________ Boston-pm mailing list Boston-pm@mail.pm.org http://mail.pm.org/mailman/listinfo/boston-pm