Skip to content
Fetching contributors…
Cannot retrieve contributors at this time
48 lines (43 sloc) 1.77 KB
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
<p>Test for <a href="">bug 11402</a> and
<a href="">bug 12701</a>:
An onChange event should fire when the first item is not the default, and
after changing the value via JavaScript.</p>
<p>After following the steps below, both selects should display "SUCCESS".</p>
<form action="" method="post" name="areaform" id="areaform">
<select name="selectitem" onChange="onChange1(this)">
<option value="1">Please change this to another value</option>
<option value="2">(to this one)</option>
<form action="" method="post" name="areaform2" id="areaform2">
<select name="selectitem2" onChange="onChange2(this)">
<option value="1">(to this one)</option>
<option value="2" selected>Please change this to another value</option>
function onChange1(sel) {
if (sel.secondTry) {
} else {
sel.options[0].text='Please change this to another value once again';
sel.value = '1';
sel.secondTry = 1;
function onChange2(sel) {
if (sel.secondTry) {
} else {
sel.options[1].text='Please change this to another value once again';
document.forms.areaform2.selectitem2.options[1].selected = true;
sel.secondTry = 1;
Something went wrong with that request. Please try again.