Solutions for Popup blocker detection in Opera, window.open in opera

window.open in Opera browser resume the javaScript execution, even if we are detecting popup blocker in Opera, then we need to use following function,



function CheckPopupBlocker()
{
var allowed = "Blocked";
var mywindow = window.open('','mypopup');
if(mywindow) {
    try{
            mywindow.close();
            allowed = "Allowed";           
    } catch (eOpera) {
          // It won't close a window if it didn't open; hence it was probably blocked.
          return allowed;
    }
  }
return allowed;
}

Reference url:
http://forums.mozillazine.org/viewtopic.php?f=25&t=486198&start=15

Comments

Popular posts from this blog

Leap Year Calculator

PDF form validation using javascript

CSS Mouse Cursors and Custom Cursors