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 10:54:03 UTC