smmsmm57
asked on
Javascript modal dialog box - want it without cancel (X in top right corner) capability
I use a modal dialog in Javascript to create a "pop up dialog" that gets some data from the end user, using the following code:
function PopUp(url)
{
if (window.showModalDialog)
{
newwindow = window.showModalDialog(url ,
"PopUp",'dialogHeight:200p x,dialogWi dth:500px, status:no');
} else {
alert(' bad');
}
return false;
}
the page loaded has two button images whos onclick method I use to return to the caller....all of this works fine except that I do NOT want user to be able to hit X on right top of window so as to cancel the window and leave my code in an unknown state. Anyone know how to prevent the showing of the "X" in top right corner, or how to disbale it?
function PopUp(url)
{
if (window.showModalDialog)
{
newwindow = window.showModalDialog(url
"PopUp",'dialogHeight:200p
} else {
alert(' bad');
}
return false;
}
the page loaded has two button images whos onclick method I use to return to the caller....all of this works fine except that I do NOT want user to be able to hit X on right top of window so as to cancel the window and leave my code in an unknown state. Anyone know how to prevent the showing of the "X" in top right corner, or how to disbale it?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.