PRB: Form.Reset is not Supported in Internet Explorer 3.0xID: Q190892
|
When attempting to call the reset method on a form object from a script, Internet Explorer reports the following error:
The same code functions correctly in Internet Explorer 4.0, resetting the form elements to their default values.[Line: xx] Object doesn't support this property or method.
The versions of Internet Explorer listed above do not support a reset method on the form object.
By placing an input element of type RESET on the form, the click event of that button can be invoked from script.
Internet Explorer 4.0 supports a reset method on the form object.
<HTML>
<HEAD>
<SCRIPT>
function DoReset()
{
// -- The follow will result in a script error:
document.oForm.reset();
}
</SCRIPT>
</HEAD>
<BODY>
<FORM NAME=oForm>
<INPUT TYPE=BUTTON VALUE="Pseudo-Reset" onClick="DoReset()">
<INPUT TYPE=CHECKBOX>
<INPUT TYPE=TEXT VALUE="Default">
</FORM>
</BODY>
</HTML>
document.oForm.reset();
to the following:
document.oForm.btnReset.click();
<INPUT TYPE=RESET NAME=btnReset>
Additional query words:
Keywords : kbIE300 kbIE301 kbIEObj kbScript kbIE302
Version : WINDOWS:3.0,3.01,3.02
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: May 3, 1999