Monday 28 October 2019

Open Popup window using 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.



Answer



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.


No comments:

Post a Comment

php - file_get_contents shows unexpected output while reading a file

I want to output an inline jpg image as a base64 encoded string, however when I do this : $contents = file_get_contents($filename); print &q...