W3C home > Mailing lists > Public > www-html@w3.org > August 2000

RE: checkbox event handler

From: <pdf@bizfon.com>
Date: Fri, 4 Aug 2000 12:20:44 -0400
To: Dave J Woolley <DJW@bts.co.uk>
cc: www-html@w3.org
Message-ID: <85256931.0059CA7A.00@Enterprise>


I appologize if this is the incorrect list to discuss this.  I just figured that
event handlers could be discussed, since they are in the html spec..  :)

I have already looked at the link you sent below, which is why I wanted to post
my question to the html list.  There seems to be javascript examples throughout
the html specs, yet I can't find any sort of javascript specs on the W3 site.
The link basically just says that you can use the onchange event for the INPUT
tag, but doesn't mention anything about limits to it.  For example, does the
onchange event apply only to the "value" of the INPUT, or does it also apply to
the "checked" property of the checkbox INPUT tag?  In my opinion, these are html
questions, because it is concerning the INPUT tag of type checkbox.

Fortunately, I'm not writing for the internet.  I'm working on an application
and in my case, it's ok to force the users to use IE with Javascript enabled.

Anyway, thanks for the input.
Peter Foti





Dave J Woolley <DJW@bts.co.uk> on 08/04/2000 10:54:01 AM

To:   www-html@w3.org
cc:    (bcc: Peter Foti)

Subject:  RE: checkbox event handler



> From:   pdf@bizfon.com [SMTP:pdf@bizfon.com]
>
> I'm looking through the O'Reilly book "Javascript: the Definitive Guide"
> and
     [DJW:]
     Stop here.  This list is not about Javascript (or proprietary
     document models); it is about the design of the pure HTML
     language.  It is also best to use original source documents, not
     third party books.

> they list that the input type 'checkbox' does not have an onchange event
> handler.  I looked through the HTML 4.01 spec, but could not find anything
> that
     [DJW:]
     The HTML 4.01 specification says that INPUT, SELECT and
     TEXTAREA and only they support onchange=.  It doesn't distinguish
     between types of input element.  See:
     <http://www.w3.org/TR/html40/interact/scripts.html#h-18.2.3>

> said which event handlers each input type has.  The onchange event seems
> to work
> in IE5 (haven't tested in anything else).  I'm wondering if that's a
> mistake in
> the O'Reilly book, or whether a checkbox really DOES have an onchange
> event
> handler.
>
     [DJW:]  It's fairly well known that Netscape 4.x doesn't support
     all the events specified in HTML 4.  If you are writing for
     the internet, you should first ensure that the page works without
     any scripting (I reject it for security reasons, even when not
     using Lynx), then author according to the Netscape Javascript
     Reference, avoiding any use of layers. Finding alternatives to
     onchange, is left as an exercise, or for a Netscape support
     forum.  (Hint: look at the preconditions for onchange triggering.)

--
--------------------------- DISCLAIMER ---------------------------------
Any views expressed in this message are those of the individual sender,
except where the sender specifically states them to be the views of BTS.
Received on Friday, 4 August 2000 12:20:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:43 GMT