Jump to content

popup blocker detection


alpine

Recommended Posts

Since one is required to begin testing with IE7 i've came across only one "problem" so far - IE7 seems to have a slightly stricter popup blocker as default compared to the default setting in IE6.
One one of my sites i have a drop down menu that sets off a new window via javascript onchange. In FF,Opera and IE6 this was no problem but IE7 now stops this new window from launching.

Any good solutions on a blocker alert (preferrably cross browser) so i can explain users what happened and how to allow pop ups on my site?
Link to comment
Share on other sites

How about something like this.

[code]
function openWindow(url) {
    if (window.open(url,'name','height=200,width=150')) {
      doSomething();
  } else {
        alert('You will have to set your popup blocker to allow popups to see this..or whatever');
  }
}
[/code]


Is that what you were wanting?

Good Luck,
Tom
Link to comment
Share on other sites

well, i've been testing something similar - the problem is that in the moment IE blocks content it seems to be stopping all scripts, so any custom message to the user never appears.... and thats where the challenge is.

In the end the best would be to remove the dropdown-launch and do another twist i guess, but still a block message could be handy in some cases.
Link to comment
Share on other sites

Yeah, thats true - i do however hate having to do things more than one way on my sites ... and i really couldn't settle with the blocked solution anyhow, so i removed the dropdown and replaced it by a style-"hidden" html menu instead. Then the text-links triggers the popup and its not blocked by default settings.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.