Thursday, August 12, 2010

Form submit issue in javascript with IE6

Generally we will write document.frmRegistration.submit(); to submit the form in javascript. This will work in all other browsers except IE6. Here "frmRegistration" is the form name.

To make it work this in IE6, it should be written as:.

document.getElementById('frmRegistration').submit();
Note: Here "frmRegistration" is the element id not the form name.

This works in IE6 as well as in all other browsers.

1 comment: