+ Start a Discussion
Cha YangCha Yang 

Onclick Javascript popup blocked by browser

I created a custom button to launch a url, however the browser's popup blocker url from launching. 
How do I get around this? I don't want to disable popup blocker for other safety. 
 
{!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")};

var p;
p = "You've been logged in to Accurint 1.  Please remember to log out when you're finished.";
alert(p);

var updateRecords= [];

var o = new sforce.SObject("Research_Tools__c");
o.id = "{!Research_Tools__c.Id}";
o.User_1__c ="{!User.Name}";
o.Logged_in_1__c = "{!Today}";

updateRecords.push(o);
result = sforce.connection.update(updateRecords);

window.location.reload();
window.open("https://secure.accurint.com/app/bps/main/");
Deeprao18Deeprao18
Hi Cha Yang,

Click on the address to allow the popup and then from the setting choose always allow pop up from this site.

This should work. Please try and let me know
Cha YangCha Yang
I tested and that worked but I don't want to go to every computer and add this to their allowed list. Any other options?

 
Deeprao18Deeprao18
https://help.salesforce.com/articleView?id=000004894&type=1

Set this up in the browsers and you should be good
Deeprao18Deeprao18
Basically this setup should be one time across browsers but yes you need to set it up in all systems, but still checking for a better workaround