<html>
<head>
<script type="text/javascript">
if (window.testRunner)
testRunner.dumpAsText();
function showMe()
{
var varString = '';
var element = '';
var oneForm = document.forms["test_form"];
var totalElements = oneForm.length;
for (var increment = 0; increment < totalElements; increment++)
{
element = oneForm[increment];
if (element.tagName == "INPUT" || element.tagName == "TEXTAREA")
{
if ( (element.type == 'checkbox' && element.checked) ||
(element.type == 'radio' && element.checked) ||
element.type == 'text' ||
element.type == 'password' ||
element.type == 'hidden' )
{
varString += element.name + "=" + element.value + "<br>";
}
}
else if (element.tagName == "SELECT")
{
varString += element.name + "=" + element.options[element.selectedIndex].value + "\n&";
}
}
document.getElementById('results').innerHTML = varString;
}
</script>
</head>
<body onload="showMe()">
<p>Check form element indexed iteration (there should be no identical lines).</p>
<div id="results"></div>
<form action="testme.html" method="post" name="test_form" id="test_form">
<input type="hidden" name="field_000" value="Field_000">
<input type="hidden" name="0" value="0">
<input type="hidden" name="-1" value="-1">
<input type="hidden" name="method" value="Method">
<input type="hidden" name="reset" value="Reset">
<input type="hidden" name="focus" value="Focus">
<input type="hidden" name="children" value="Children">
</form>
</body>
</html>