I have a form to submit a trouble ticket via the web, it takes a bit for the form to process after the "submit" button is hit. Consequently there's people who click,click,click,click away at it and we get n submissions of the same ticket.
So I'm trying to use a window to appear to stop that from happening while the form processes in the background. At the end of the javascript that passes the gathered info to the form for processing, I call the function below.
New window ("stop clicking submit, dumbs***") opens, takes focus, and should disappear of it's own accord in 8 seconds.
Using the following code:
Well, this works like a charm in IE7, IE8, FF3.x in Mac & Win, but not in Safari. The window never closes.
I've tried using the debugger in Safari to figure out the problem and reading the dev documentation on the apple dev site, but I'm not coming up with any answers. I'd prefer to get the correct javascript into the main page where all this is defined and called from, and not put a separate close() in the HTML of the opened window. That just seems sloppy, and lord knows, it's sloppy enough as it is.
Thanks for any help/advice.
So I'm trying to use a window to appear to stop that from happening while the form processes in the background. At the end of the javascript that passes the gathered info to the form for processing, I call the function below.
New window ("stop clicking submit, dumbs***") opens, takes focus, and should disappear of it's own accord in 8 seconds.
Using the following code:
Code:
function openWin()
{
myWindow=window.open('http://domain.com/blah','','width=800,height=600');
myWindow.setTimeout('close();',8000);
myWindow.focus();
}
Well, this works like a charm in IE7, IE8, FF3.x in Mac & Win, but not in Safari. The window never closes.
I've tried using the debugger in Safari to figure out the problem and reading the dev documentation on the apple dev site, but I'm not coming up with any answers. I'd prefer to get the correct javascript into the main page where all this is defined and called from, and not put a separate close() in the HTML of the opened window. That just seems sloppy, and lord knows, it's sloppy enough as it is.
Thanks for any help/advice.