Question
AIG
US
Last activity: 30 Mar 2016 13:35 EDT
Firefox blocking the popup and stopping the Post call there after.
Firefox blocking the popup and stopping the Post call there after.The firefox was configured not to block popup ,tried to allow tghe popup for the pega server but still it catches the popup and stop it .it allows firt pop form the server ,second pop onwards it gives a " message to stop additional pop ".how to allow pop ups
The javascript is embedded to section to have the alert popup then on click of ok pega activity is called to post the form and save the work object.
attached the Pop up warning from fire fox
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
AIG
US
Yes Thats correct httpRequestAynch will work with IE only, recoded to use pega.util.Connect.asyncRequest
Hi Ranjith,
I did some research on the issue you have reported here. I hope the below information is of some help to you.
I googled "Prevent page from creating additional dialogs" and came across several developer forums that indicate that this is a Firefox feature and the reason it popups up is because of the usage of multiple alert()/confirm() dialogs in the javascript code, this is true with the 'custom' javascript code provided with the SR.
Hi Ranjith,
I did some research on the issue you have reported here. I hope the below information is of some help to you.
I googled "Prevent page from creating additional dialogs" and came across several developer forums that indicate that this is a Firefox feature and the reason it popups up is because of the usage of multiple alert()/confirm() dialogs in the javascript code, this is true with the 'custom' javascript code provided with the SR.
The forums also seem to indicate that there is no solution to this and it also cannot be programmatically disabled by javascript. They advise us to revisit the javascript code and consider a new implementation to avoid a multiple dialog scenario.
The below website also offers a solution for the end user on his browser, you may want give that a try...
Thank you,
Sunny
Pegasystems
US
>>> I googled "Prevent page from creating additional dialogs" and came across several developer forums that indicate that this is a Firefox feature
It seems to be an IE feature as well. For example, go to "DesignerStudio - > process & rules - > processes - > flow errors" screen from the developer portal and click "delete orphan assignments" twice. The second popup will include an option saying "Prevent this page from creating additional dialogs". /Eric
AIG
US
Hi Eric
Which version of IE does show this .IE 9 works good and doesnt show the message.
Eric,
This is a very interesting find on IE. I checked IE11 at my end and I do not see this message.
I searched online again to see if there were previous reports about this message with IE, but I have only found reports with Firefox & Chrome. Did you happen to find anything on IE as well, if so please do share.
But my thoughts on this issue still remain the same - every post I have read seem to suggest the same 'root cause' for the problem that is experienced - which is 'the use of your alert/confirm in your code'
I have not found anything that offers a 'programmatic' js way of moving the customer forward here with his current code unless there are more suggestions from people here.
We may have to think of an alternate approach for implementing the 'AutoSave' use case.
Thank you,
Sunny
AIG
US
Hi Sunny
Lets say this is not an issue ,on click of Yes option in the confirm box ,the next step is to call the httpAsynch method to call the activity which does save of the work object.
In tracing the session this call is nor made and only the next alert box was shown.
Do you see why the confirm box did call the httpasynch method activity ?
Ranjith,
Can you try changing your code from below...
function startPost()
{
confirm("Auto save in progress..Please wait");
var oSafeURL = new SafeURL("Chartis-FW-OneClaimCore-Work-MLR.AutoSave");
var strUrl = oSafeURL.toURL();
httpRequestAsynch(strUrl);
alert("Auto Saved the MLR.Please continue...");
}
to...
function startPost()
{
var r = confirm("Auto save in progress..Please wait");
if (r== true){
var oSafeURL = new SafeURL("Chartis-FW-OneClaimCore-Work-MLR.AutoSave");
var strUrl = oSafeURL.toURL();
httpRequestAsynch(strUrl);
alert("Auto Saved the MLR.Please continue...");
}
}
and check if it makes any difference to your experience.
Another thought...if you remove second alert "alert("Auto Saved the MLR.Please continue...");" do you see any change in the behavior?
Thanks.
AIG
US
Hi Sunny
Tried the below and here is the observation
# 1 The confirm box appreas twice : var res=confirm(" Go ahead Save...Please wait"); since there is a reload call before this ,somehow this is loaded again .
# 2 This wasnt called ---> httpRequestAsynch(strUrl);
# 3 Alert pop not shown :setTimeout(function(){ alert("Completed POST"); }, 3000);
if i take the httpRequestAsynch(strUrl); code i get the alert Completed POST
Beofe i get the Completed POST alert again the confirm(" Go ahead Save...Please wait"); show up....
---------------------
<!DOCTYPE html>
<html>
<head>
<script type="text/javaScript">
setInterval(function() {doAutoSave();}, 60000);
function doAutoSave()
{
var section=pega.u.d.getSectionByName("MasterSection", '', document);
pega.u.d.reloadSection(section,'', '', false, true, '-1', true);
setTimeout(function(){startPost();},10000);
}
function startPost()
{
var res=confirm(" Go ahead Save...Please wait");
if (res==true)
{
var oSafeURL = new SafeURL("Chartis-FW-OneClaimCore-Work-MLR.AutoSave");
var strUrl = oSafeURL.toURL();
httpRequestAsynch(strUrl);
setTimeout(function(){ alert("Completed POST"); }, 3000);
}
else
{alert("res No");
}
}
</script>
</html>
Ranjith,
I do not know enough to exactly explain why in FF you DO NOT see the httpRequestAsynch() fire in the presence of confirm/alert() in your JS code.
Just for a test, can you remove all the confirm/alert you have in your JS code and verify that the httpRequestAsynch() does fire in every test run in FF. If, in the absence of confirm/alert(), you still notice that the function is not called, then we have an even more serious problem.
Is it possible for you to mock up a simple sample on PegaSample application that uses your JS code to demonstrate your problem?
Thanks.
AIG
US
Hi Sunny tried only with httpasync reuqest and it didnot fire or execute the code on firefox.
I came across that this method is not supported for chrome .It also looks like it is not supported for firefox .
Can you please confirm?
Hi Ranjith,
That's not true, there are several places in the core product we use this api to make aynschronous http request calls. If this was not supported by a non-IE browser, this would have been a problem identified since much older versions of PRPC 5/6, not just Pega 7 and we would not have been able to support end user portal applications on non-IE browsers. That is clearly not the case.
httpRequestAsynch() is defined in httprequestscript.js for your reference.
Did you try and mock up a simple sample on PegaSample application, use your code on this sample, please share that demo ruleset here for us to further look into it.
Thank you,
Sunny
Pegasystems
US
>>> This is a very interesting find on IE. I checked IE11 at my end and I do not see this message.
Did you do it twice ? I only see the message the second time. My ie is 11 as well. /Eric
AIG
US
Hi Eric ,IE doesnt have any warning messages displayed ,It displays the confirm message and Alert correctly.
please see the reply to sunny with the code.Firefox doesn't execute the httpasync method .
Is this normal behavior even without pop up ?
AIG
US
Hi sunny
Here is the link sent by Kevin .This states the method is not supported in Chrome ,By default we assume that these methods work.
in my testing it doesnt work for firefox too.Can someone confirm this ?
Hi Ranjith,
Apologies for the late reply.
I stand corrected, I discussed this article internally and confirmed that what the article states is accurate. httpRequestAynch will work with IE only, you will need to use pega.util.Connect.asyncRequest to make it cross-browser. Please discard my last comment. Thank you.
Accepted Solution
AIG
US
Yes Thats correct httpRequestAynch will work with IE only, recoded to use pega.util.Connect.asyncRequest