I have a function that submits a form, calls a function to refreh the main page and closes the window. It works perfectly for me, but fails when another user tries it. We are both logging in to the same computer (so there is no difference in the browser version).
the function calls are as follows:
function submitForm() {
window.setTimeout('document.editLostForm.submit()', 0);
window.setTimeout('window.opener.timedRefresh(); window.close()', 20);
}
if I place an alert in after the the submit(), it works for everyone. I thought the setTimeout() call would resolve the problem, but it persits.
The moment a form is submitted, it's containing page is dismissed, so any pending timeouts can't be guaranteed.
Submit the form with a submit-type button.
The onsubmit handler should call a function in the opener which closes the window it opened, then refreshes its own document.
Bookmarks