<html>
<title>User Info</title>
Please update your info and hit "Submit".
<script type="text/javascript"><!-- hide from old browsers
function validate (form) {
var alertstr = '';
var invalid = 0;
var invalid_fields = new Array();
// sex: radio group or multiple checkboxes
var sex = null;
var selected_sex = 0;
for (var loop = 0; loop < form.elements['sex'].length; loop++) {
if (form.elements['sex'][loop].checked) {
sex = form.elements['sex'][loop].value;
selected_sex++;
if (sex == null || (sex != '1' && sex != '3' && sex != '5')) {
alertstr += '- Choose one of the "glass EYE fucker" options\n';
invalid++;
invalid_fields.push('sex');
}
} // if
} // for sex
if (! selected_sex) {
alertstr += '- Choose one of the "glass EYE fucker" options\n';
invalid++;
invalid_fields.push('sex');
}
if (invalid > 0 || alertstr != '') {
if (! invalid) invalid = 'The following'; // catch for programmer error
alert(''+invalid+' error(s) were encountered with your submission:'+'\n\n'
+alertstr+'\n'+'Please correct these fields and try again.');
return false;
}
return true; // all checked ok
}
//-->
</script>
<form action="TEST" method="get" onsubmit="return validate(this);"><input id="_submitted" name="_submitted" type="hidden" value="1" />
<tr class="optional invalid"><th>Name</th><td><input id="name" name="name" type="text" /> </td></tr>
<tr class="optional invalid"><th>Color</th><td><input id="color_red" name="color" type="checkbox" value="red" /> <label for="color_red">1</label>
<input id="color_blue" name="color" type="checkbox" value="blue" /> <label for="color_blue">2</label>
<input checked="checked" id="color_yellow" name="color" type="checkbox" value="yellow" /> <label for="color_yellow">3</label>
<input id="color_pink" name="color" type="checkbox" value="pink" /> <label for="color_pink">4</label>
</td></tr>
<tr class="optional invalid"><th>Email</th><td><input id="email" name="email" type="text" /> </td></tr>
<tr class="required invalid"><th>glass EYE fucker</th><td><input id="sex_1" name="sex" type="radio" value="1" /> <label for="sex_1">2</label>
<input id="sex_3" name="sex" type="radio" value="3" /> <label for="sex_3">4</label>
<input id="sex_5" name="sex" type="radio" value="5" /> <label for="sex_5">6</label>
</td></tr>
<tr class="optional invalid"><th>Size</th><td><input id="size" name="size" type="text" /> (unknown) </td></tr>
<input id="_submit" name="_submit" onclick="this.form._submit.value = this.value;" type="submit" value="Update" /><input id="_submit_2" name="_submit" onclick="this.form._submit.value = this.value;" type="submit" value="Delete" />