[Webkit-unassigned] [Bug 24516] onchange event on form doesn't fire (or bubble up)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue May 8 23:57:47 PDT 2012
https://bugs.webkit.org/show_bug.cgi?id=24516
Keishi Hattori <keishi at webkit.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |keishi at webkit.org
--- Comment #16 from Keishi Hattori <keishi at webkit.org> 2012-05-08 23:56:49 PST ---
This script from the spec doesn't work in webkit.
http://www.whatwg.org/specs/web-apps/current-work/#the-script-element
<script>
function calculate(form) {
var price = 52000;
if (form.elements.brakes.checked)
price += 1000;
if (form.elements.radio.checked)
price += 2500;
if (form.elements.turbo.checked)
price += 5000;
if (form.elements.sticker.checked)
price += 250;
form.elements.result.value = price;
}
</script>
<form name="pricecalc" onsubmit="return false" onchange="calculate(this)">
<fieldset>
<legend>Work out the price of your car</legend>
<p>Base cost: £52000.</p>
<p>Select additional options:</p>
<ul>
<li><label><input type=checkbox name=brakes> Ceramic brakes (£1000)</label></li>
<li><label><input type=checkbox name=radio> Satellite radio (£2500)</label></li>
<li><label><input type=checkbox name=turbo> Turbo charger (£5000)</label></li>
<li><label><input type=checkbox name=sticker> "XZ" sticker (£250)</label></li>
</ul>
<p>Total: £<output name=result></output></p>
</fieldset>
<script>
calculate(document.forms.pricecalc);
</script>
</form>
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list