ajefferies
Programmer
I have a problem with a JavaScript function submitting a form twice. It looks like:
<a href="javascriptarent.frames['fn'].submitFunction();">
<img src="/image.gif" border="0"> submit
</a>
submitFunction() validates and submits a form.
What actually happens (in some versions of IE5.0) is the form is POSTed correctly, with the right attributes, and the right cookie. Immediately after, another call to the same url (servlet) is made as a GET, no attributes, no cookie.
The servlet performs a client-side redirect.
The same thing happens if I submit the form like:
javascriptarent.frames['fn'].document.forms['form'].submit();
and use onSubmit to validate.
Anyone know what's up? Currently, the second (invalid) attempt overwrites the first, and so an error is returned to the user. Or, does anyone know if I can discard the second submission without upsetting the browser? Netscape & IE5.5 does not have this problem.
Many thanks,
Andy.
<a href="javascriptarent.frames['fn'].submitFunction();">
<img src="/image.gif" border="0"> submit
</a>
submitFunction() validates and submits a form.
What actually happens (in some versions of IE5.0) is the form is POSTed correctly, with the right attributes, and the right cookie. Immediately after, another call to the same url (servlet) is made as a GET, no attributes, no cookie.
The servlet performs a client-side redirect.
The same thing happens if I submit the form like:
javascriptarent.frames['fn'].document.forms['form'].submit();
and use onSubmit to validate.
Anyone know what's up? Currently, the second (invalid) attempt overwrites the first, and so an error is returned to the user. Or, does anyone know if I can discard the second submission without upsetting the browser? Netscape & IE5.5 does not have this problem.
Many thanks,
Andy.