Click to See Complete Forum and Search --> : Is PopUp being Blocked?
rgurecki
08-07-2003, 07:31 AM
I have a link that opens a PopUp window with content. It seems that some users have popup blocking software and are not getting the requested content. Is there a way to determine that the PopUp has been blocked and if so direct the user to the content using the existing window
AdamBrill
08-07-2003, 07:42 AM
I haven't tested it(since I don't have a popup blocker. ;)), but you should be able to do this:
if(window.open()){
//window opened
}else{
//window didn't open
}
I guess just try that and see if it works. :)
AdamGundry
08-07-2003, 10:58 AM
I've a hunch that won't work, Adam, because I think at least some popup-blockers don't interface directly with the browser, scanning the active windows instead.
You shouldn't really be using popup windows at all - just keep the content in the same window.
Adam
AdamBrill
08-07-2003, 11:59 AM
Originally posted by AdamGundry
I've a hunch that won't work, Adam, because I think at least some popup-blockers don't interface directly with the browser, scanning the active windows instead.Yeah, that could be. Like I said, I don't have a popup-blocker, so I don't know how they work or how to tell what they just did. :)
I agree, though, it would be better it they would just keep all of the content in the same window.... ;)
Charles
08-07-2003, 02:18 PM
Or you can use this fail safe method of opening a new window:
<a href="http://www.w3.org/" onclick="window.open (this.href, 'child', 'height=400,width=300,scrollbars'); return false">W3C</a>