Link to home
Start Free TrialLog in
Avatar of smmsmm57
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:200px,dialogWidth: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?
SOLUTION
Avatar of hernst42
hernst42
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial