Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Detecting if user is blocking pop-ups

Status
Not open for further replies.

GaryCam

Programmer
Dec 16, 2003
69
US
I have a site with some thumbnails on it. When the visitor clicks on a thumbnail, the full-size image appears in a new window. As I understand it, "new window==pop-up" so anyone who is blocking pop-ups won't see the full sized images. Can a script check for pop-up blocking and, if it exists, ask the user to temporarily disable it (via message box?)?

Or is there a better way of accomplishing this without opening a new window at all?
 
Well I haven't tried this but use an if statement to check to see if it still exists sorta
Code:
new=window.open("about:blank");
if (new) { //if new is true then the window as popped up
alert('Its there');
}else {
alert('Its not there');
}
Again I'm not sure if this will work because I don't know if pop up blockers close the window once its opened or just blocks the script completly. What I would do is open a modeless window.
HTH
Matt
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top