3 <meta http-equiv=
"content-type" content=
"text/html; charset=iso-8859-1">
4 <title>Charsets and submitting forms
</title>
7 <form name=
"f" method=
"?" action=
"textarea-setvalue-submit.html">
8 <textarea id=
"textarea1" name=
"textarea1">default value
</textarea>
9 <textarea id=
"textarea2" name=
"textarea2" style=
"display:none">default value
</textarea>
13 if (document
.URL
.indexOf('?') == -1) {
15 if (window
.testRunner
) {
16 window
.testRunner
.dumpAsText();
17 window
.testRunner
.waitUntilDone();
20 var textarea1
= document
.getElementById("textarea1");
21 textarea1
.value
= "new value";
22 var textarea2
= document
.getElementById("textarea2");
23 textarea2
.value
= "new value";
28 var formData
= document
.URL
.substring(document
.URL
.indexOf('?') + 1, document
.URL
.length
);
29 var expected
= "textarea1=new+value&textarea2=new+value";
30 if (formData
== expected
)
31 document
.write("Success");
33 document
.write("Failure. The value set in the textarea via javascript wasn't sent when the form was submitted. Expected: " + expected
+ ", Found: " + formData
);
35 if (window
.testRunner
)
36 window
.testRunner
.notifyDone();