Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Open Popup window using javascript [closed]

Tags:

javascript

I am looking to open one aspx page (test.aspx) in two different popup windows at the same time.

what I have till now second replace first one and page recreate in first.

I think it require more clarification here so,

Basicaly I create a graph and place it in test.aspx, and save that graph as image file. I put a button on test.aspx which linked with stimulsoft report and that report show pdf format of that image. Now if i open with test.aspx it replace the image page. but I want to see both graph and pdf same time. One solution is I create a new blank aspx page to display report but I try avoid to add new page because it is possible to mount report on test.aspx.

The question is just to open a single POPUP window twice on same time, but may be it is posible or not. and each and every popup containing there own dynamic controls and report like mrt.

like image 295
Roomy Avatar asked Jan 16 '13 05:01

Roomy


People also ask

How do I open a popup with JavaScript?

The syntax to open a popup is: window. open(url, name, params) : url. An URL to load into the new window.

How do I close a popup in JavaScript?

close() method simply close the window or tab opened by the window. open() method. Remember that - You have to define a global JavaScript variable to hold the value returned by window. open() method, which will be used later by the close() method to close that opened window.

How do I close a popup window?

To safely close a pop-up window, locate the button in your Taskbar that corresponds to the pop-up. Normally, the button and the pop-up will have the same title. Right click on the button and select Close.

How do you check if a window is closed in JavaScript?

How to check if an opened browser window is closed or not in JavaScript? To check if an opened browser window is closed, you can use the closed property in referenced window object in JavaScript. The property returns a boolean true if the window is closed and false if the window is in the opened state.


1 Answers

Change the window name in your two different calls:

function popitup(url,windowName) {        newwindow=window.open(url,windowName,'height=200,width=150');        if (window.focus) {newwindow.focus()}        return false;      } 

windowName must be unique when you open a new window with same url otherwise the same window will be refreshed.

like image 155
Umesh Avatar answered Sep 20 '22 13:09

Umesh