Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Lock a window

Status
Not open for further replies.

bjorna

Programmer
May 28, 2001
12
NO
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(&quot;<HTML><HEAD><TITLE>Wait</TITLE></HEAD><BODY bgcolor=yellow>Saving. Please wait. </BODY></HTML>&quot;);
document.forms[0].elements[0].name=OkCode
document.forms[0].submit()
}


function closeOnSave()
{
if (win && win.open && !win.closed) win.close();
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top