0
votes

I have requirement where I need to open a popup on click of a button. This works fine, but the pop up window goes behind the opened browser. I want to restrict access to the other opened browser window until the complete transaction in the newly opened window is done.

In order to open a new window I am using the following code.

Response.Write("detailedresults=window.open('NewWindow.aspx','Send Data','left=(screen.width) ? (screen.width - 800) / 2 : 0,top=(screen.height) ? (screen.height - 700) / 2 : 0, width=1000, height=500, toolbar=no, menubar=no, titlebar=no, location=no, addressbar=no');");

1

1 Answers

0
votes

I would use a modal dialog for this instead of a popup. One, modal dialogs are less intrusive to other tabs that might be open, and two, they typically include a semi-transparent overlay layer covering the main window to restrict access as you requested. Here is an example from jQuery UI:

http://jqueryui.com/dialog/#modal-confirmation