so the way I understand the Firefox popup blocker is that it will block popups in which the user did not initiate the opening of the popup (correct me if I’m wrong on this)
for instances if you just have
window.open(url, name);
It’ll block the popup but if you have
$('checkbox').change(function(){
window.open(url, name);
});
It won’t block the popup since it’s contingent on the user performing an action (ie. change the checkbox values)…
But then when I did
$('checkbox').change(function(){
$.ajax({
url: someUrl,
success : function(data){
if(someCondition){
window.open(someOtheUrl, name);
}
}
});
});
Firefox would then try to block this window.open call despite the fact that it’s still contingent on the user performing an action…
Is there a way to tell firefox that this popup is legitimate and not have firefox block it when using ajax within a user action?
I agree with these previous comments, You do not need to use a popup. Just use a jquery-ui modal like this ….
});
So this will work perfectly and ofcourse its more appeasing to the user than a damn popup!!
NOTE Some stuff in the code may not be usefull to you … I just picked some javascript code I wrote!