W3C home > Mailing lists > Public > www-validator@w3.org > August 2001

Re: INPUT TYPE="checkbox"

From: Nick Kew <nick@webthing.com>
Date: Fri, 24 Aug 2001 19:39:15 +0100 (BST)
To: Philip Mak <pmak@animeglobe.com>
cc: www-validator@w3.org
Message-ID: <Pine.BSF.4.21.0108241934500.582-100000@fenris.webthing.com>

On Fri, 24 Aug 2001, Philip Mak wrote:

> unless ($f{terms} eq 'on') {
>   print "ERROR: You must agree to the Terms and Conditions.";
>   $Response->End();
> }
> 
> I'm requiring that "terms" be set to "on". I'm guessing that the AOL
> browser decided to send "terms" as something else,

Yes, that makes sense.  I always test checkboxes for [any value]
vs [null value], and I've never encountered any problem with it.

> explicitly specify a VALUE attribute for my checkbox. (Perhaps I should
> have just written unless ($f{terms}) instead.)

Yes.  Indeed, I'm sure I've seen different browsers returning values
other than just "on" sometime before now.

-- 
Nick Kew

Site Valet - the essential service for anyone with a website.
<URL:http://valet.webthing.com/>
Received on Friday, 24 August 2001 14:39:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 25 April 2012 12:13:59 GMT