W3C home > Mailing lists > Public > public-html-bugzilla@w3.org > January 2011

[Bug 11129] Remove forminput, formchange and related dispatch methods

From: <bugzilla@jessica.w3.org>
Date: Wed, 26 Jan 2011 21:41:23 +0000
To: public-html-bugzilla@w3.org
Message-Id: <E1PiD7D-00013D-BX@jessica.w3.org>

--- Comment #15 from Simon Pieters <simonp@opera.com> 2011-01-26 21:41:21 UTC ---
(In reply to comment #14)
> Those are not really a use cases, but descriptions how one could
> use the events and methods ;)

Consider a shopping cart where the customer can select the quantity of each
item and the page updates the total amount on the fly. The author generates the
shopping cart with PHP but doesn't know enough about javascript and DOM Events
to be confident about how to walk the tree or use capturing event listeners (or
even that they exist), so instead outputs the calculation script in the
onforminput="" attribute with PHP since he already has implemented the logic to
output the actual shopping cart itself with PHP. The end result might be
something like:


> Also, why couldn't scripts use the existing events for the first case?

You need a capturing event listener for that, which is not available as markup
and many authors who know enough to use event handler attributes don't know
that capturing event listeners exist or how they work.

> And for the latter one there could be just a javascript function to call.

If you have several event handler content attributes you would need to call all
of them. It's more convenient to dispatch an event.

Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Wednesday, 26 January 2011 21:41:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 20:01:38 UTC