In firefox hidden fields do not reset using javascript.
In my example (see code) there is a button to reset the value of the hidden field and one button to reset the entiere form.
And there is a button to change the value of the hidden field.
In Firefox none of the reset buttons have any effect on the hidden field value.
The defaultValue property does not function with hidden fields.
See also http://webradiall.applixia.net/test.htm
Any Ideas?
Thanks
Code: Select all
<form name="myForm">
<input type="text" name="myText" size="20" value="startvalue"><p>
<input type="button" value="set hidden field to 5" name="B2" onclick="this.form.hiddenField.value='5'"></p>
<p>
<input type="reset" value="RESET entire Form" name="B1"> </p>
<p>
<input type="button" value="Reset only hidden field" name="B4" onclick="this.form.hiddenField.value=this.form.hiddenField.defaultValue">
</p>
<p>
<input type="button" value="Reset only text field" name="B5" onclick="this.form.myText.value=this.form.myText.defaultValue"></p>
<p>
</p>
<p>
<input type="button" value="show hidden field value" name="B3" onclick="alert(this.form.hiddenField.value)">
<input type="button" value="Show hidden field defaultValue" name="B7" onclick="alert(this.form.hiddenField.defaultValue)">
<input type="button" value="Show text field defaultValue" name="B8" onclick="alert(this.form.myText.defaultValue)"></p>
<input type="hidden" name="hiddenField" value="25">
</form>