Question
Booz Allen Hamilton
US
Last activity: 5 Jun 2017 13:22 EDT
Mutilple pop ups open in IE
Hi
We have a Pop up created using Run script for the help info in each screen to appear. In Chrome, each time the help button is clicked, the existing pop up is replaced by the new information. Where as in IE, multiple windows open. How to solve this?
Thank you
***Updated by moderator: Lochan to close discussion***
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Booz Allen Hamilton
US
Note to the above issue: The pzHarnessID is same.
PEG
US
Can you provide some screenshots that show how you configured the button? Also please show the script that runs.
PEG
US
By the way, if you have a construct like this:
window.open("<%=Url%>", "PegaPopupWindow", dynamicParam,true);
Try changing it to this:
top.open("<%=Url%>", "PegaPopupWindow", dynamicParam, true); /* use top.open instead of windo
Booz Allen Hamilton
US
I tried you top instead of window. It did not work. This issue happens only in IE. In chrome the child window is replaced everytime.
Booz Allen Hamilton
US
In the code it is used as
window.open(url,"_blank").
Booz Allen Hamilton
US
I have not received any solution for this. I checked the pdn, where some suggested to remove " _blank" from the run script. That works as new tab and not pop up. Again we need to change the browser settings to achieve the pop ups (in IE and Firefox but could not find an option for chrome), which is not advisable. So what can be other solution for this. Please let me know.
Thank you
Pegasystems Inc.
IN
Hi
Can you please provide the piece of code that you are using to invoke this behavior ?
Booz Allen Hamilton
US
Hi
Following is the code used:
if(typeof(newWindow)=='undefined' || newWindow.closed){
newWindow = window.open(helpUrl,"_blank",'scrollbars=yes,resizable=yes);
} else{
newWindow.close();
newWindow = window.open(helpUrl,"_blank",'scrollbars=yes,resizable=yes);
Blue Rose Technologies GmbH
BE
Hi,
Can you use _self instead of _blank and try.
Let me know if it helps.
Booz Allen Hamilton
US
If _self is used, the window is not in a separate window or popup, instead it is tabbed in the parent window itself. But the requirement is to have a separate window.
Blue Rose Technologies GmbH
BE
Hi,
I modified your code a little bit and i am now able to open only one pop up in separate window in IE:
if(typeof(newWindow)=='undefined' || newWindow.closed){
newWindow = window.open(helpUrl, "_blank","scrollbars=yes,resizable=yes");
} else{
newWindow.close();
newWindow = window.open(helpUrl, "_blank", "scrollbars=yes,resizable=yes");}
Can you use this code and try once.
Please revert to me with the outcome.
Booz Allen Hamilton
US
The above is same as what we have implemented. It opens a new popup window. But the issue is each time the help button is clicked new window is opened instead of replacing the existing one. This issue happens only in IE. In chrome, the popup windows get replaced.
Blue Rose Technologies GmbH
BE
Hi,
The above code you shared is different then what i have added. I checked in IE browser and tested the same in the online editor (https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_close2) and i can see that even you click multiple times, single pop-up is coming.
Please open this link (above one) and try to paste your code and check the behaviour.
Thanks.
Booz Allen Hamilton
US
Hi
I tried the link that you mentioned but i am getting multiple windows i have attached the screen shot. There is a close new window is configured. But my requirement is the existing pop up window has to be replaced
Blue Rose Technologies GmbH
BE
Hi Nalins,
Please use the link (https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_win_close2) and replace the code with the one attached here and check once.
I tried the same at my end and can see that only one popup is coming. Please try this and let me know.
Booz Allen Hamilton
US
Hi
It worked fine on the link (W3 schools). But when i used in the application, it does not. In the application, the HelpUrl is defined using a data page.
Pegasystems Inc.
US
Can you send us a screen shot showing the HelpURL defined using a data page?
Thanks
Booz Allen Hamilton
US
Attached is the code used
Pegasystems Inc.
US
Hi Nalin -
Just to be clear, you want to make sure that in IE the popup window needs to be replaced instead of a new popup window like it does in Firefox and Chrome. Right?
I am surprised at your response from Apr 8th where you said that the sample at in w3 schools link worked, but you see the issue in your application.
Could you try the following:-
1. Just for testing purpose, hard code the helpURL string and see if that opens up correctly.
2. Use the "debugger;" statement to debug into your javascript code and look in developer console what is happening to the window object.
Thank you,
Bhuvana.