2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML Basic 1.0//EN" "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 function print(message)
8 var paragraph = document.createElement(
"li");
9 paragraph.appendChild(document.createTextNode(message));
10 document.getElementById(
"console").appendChild(paragraph);
14 if (window.testRunner)
15 testRunner.dumpAsText();
16 selectElement = document.getElementById(
"select1");
17 if (selectElement.value ==
"3")
18 print(
"LOAD:SUCCEEDED!");
20 print(
"LOAD:FAILED: Expected '3' found " + selectElement.value);
21 selectElement.getElementsByTagName(
"option").item(
1).selected=true;
22 if (selectElement.value ==
"2")
23 print(
"SELECT:SUCCEEDED!");
25 print(
"SELECT:FAILED: Expected '2' found " + selectElement.value);
26 document.getElementById(
"reset1").click();
27 if (selectElement.value ==
"3")
28 print(
"RESET:SUCCEEDED!");
30 print(
"RESET:FAILED: Expected '3' found " + selectElement.value);
34 <body onload=
"test()">
35 <p>This test checks to see what happens if we mark
2 items as selected in a single selection select element.
</p>
36 <p>If The test succeeds one should see
3 lines below the ruller below each containing the word SUCCEEDED in it.
</p>
37 <form id=
"form1" method=
"post" action=
"form_resp.asp">
38 <select name=
"Select" size=
"2" id=
"select1">
39 <option selected=
"selected">1</option>
41 <option selected=
"selected">3</option>
45 <input type=
"reset" name=
"reset" value=
"Reset 1" id=
"reset1"/><br/>
47 <p><ol id=console
></ol></p>