I wrote the script below to prevent users from clicking the save button twice (if the internet connection is slow).
This is how my script works - so far:
The user clicks the save button and a child window displaying "Saving. Please wait." pops up. When the save operation is completed the window reloads and the child window is closed.
But "blind" users can still ignore the message and click the save button anyway. How can I lock the parent window while the child window is displayed?
function openWarning(OkCode) {
win = window.open(".html", "dep", "height=20, width=600", "left=20, screenX=20, top=40, screenY=40"
;
win.document.open("text/html", "replace"
;
win.document.write("<HTML><HEAD><TITLE>Wait</TITLE></HEAD><BODY bgcolor=yellow>Saving. Please wait. </BODY></HTML>"
;
document.forms[0].elements[0].name=OkCode
document.forms[0].submit()
}
function closeOnSave()
{
if (win && win.open && !win.closed) win.close();
}
This is how my script works - so far:
The user clicks the save button and a child window displaying "Saving. Please wait." pops up. When the save operation is completed the window reloads and the child window is closed.
But "blind" users can still ignore the message and click the save button anyway. How can I lock the parent window while the child window is displayed?
function openWarning(OkCode) {
win = window.open(".html", "dep", "height=20, width=600", "left=20, screenX=20, top=40, screenY=40"
win.document.open("text/html", "replace"
win.document.write("<HTML><HEAD><TITLE>Wait</TITLE></HEAD><BODY bgcolor=yellow>Saving. Please wait. </BODY></HTML>"
document.forms[0].elements[0].name=OkCode
document.forms[0].submit()
}
function closeOnSave()
{
if (win && win.open && !win.closed) win.close();
}