0

I have a parent screen, containing a button, on click of which window.open("URL", "MsgWindow", "width=200,height=100"); is invoked, which in turn returns to child screen.

The child screen also contains some buttons which perform CRUD operations, using request-response mechanism, due to which the URL of the parent window needs to be updated, and hence, reloading of parent screen is required.

I want to disable the parent screen irrespective whether the parent screen gets reloaded.

I found jQuery block UI relevant for this option but found following 2 issues:

  1. Using jQuery block UI disabled the parent screen only until it get reloaded. After reloading, it again became enabled while my child pop-up was still open.

  2. jQuery block UI supports IE version 9 & above, but my requirement is to make IE version 5 compatible.

Please suggest correct solution for this scenario.

Random Guy
  • 51
  • 3
  • 12
  • IE 5!? I really hope wherever this spec is coming from it's realized IE5 is getting pretty close to 20 years old (18 and counting quickly). A lot of Javascript, HTML, CSS that modern webpages make seem trivial weren't even beginning to be a thing yet. Additionally, I'd say a new window and UI blocking a bad practice almost always. – Austin T French Oct 12 '17 at 02:01
  • For IE5, you can use window.showModalDialog instead of window.open, but this function is not support in Chrome or Firefox. https://developer.mozilla.org/en-US/docs/Web/API/Window/showModalDialog – Solomon Tam Oct 12 '17 at 02:12

1 Answers1

0
  1. I don't think there is a way to prevent user from reloading the page. Instead, you can use an iframe in a BlockUI modal dialog so that when the user reload the parent page, the popup (as an iframe inside the parent page) will also be closed.

  2. For IE5, you can use Window.showModalDialog(), but it won't support in Chrome and Firefox, so you may want to check the which browser the user is using before calling the popup function.

Solomon Tam
  • 739
  • 3
  • 11