2

I have created a popup window and below is my script.

         var action="generateCertificate";
         var url=contextPath +"/MyPage/MyPage.do?actionToPerform="+action;
         var myWindow=window.open(url,"","width=500,height=500");

And the script is successfully creating a popup window.

now my issue is when i click on the background of my page the popupbox is getting hided.

how to mask the background when popupbox is fired.

Plz help me.

Surya Prakash Tumma
  • 2,064
  • 3
  • 23
  • 42

2 Answers2

1

You can use jQuery BlockUI Plugin : BlockUI.

Shhade Slman
  • 243
  • 2
  • 9
1

No. There is no way to make a popup window modal. As the name itself suggests that it is a separate window.

If you want, you can use showModalDialog() in Javascript. The dialog allows you to include a jsp or html page inside

http://msdn.microsoft.com/en-us/library/ie/ms536759(v=vs.85).aspx

https://developer.mozilla.org/en-US/docs/Web/API/Window.showModalDialog

Also as suggested by others above, you can go for jQuery.

Keyur Golani
  • 573
  • 7
  • 26