FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Popup window

 


X3 Talk
I understand how to code popup windows, but can anyone make a script that finds out if the popup window has been blocked, and then acts accordingly?
i.e.
Code:

alert('Your browser has a popup blocker. Please remove it to continue.')

Thanks in advance, I'm just new to Javascript.
badai
you can use javascript

window_var=window.open('blah blah blah ...);
if (window_var)
var popUpsBlocked = false
else
var popUpsBlocked = true

then use the value of popUpsBlocked to determine and take any action like

if(popUpsBlocked)
alert('We have detected that you are using popup blocking software. Disable it now or I will kill you!');
X3 Talk
Thanks, that will work well on my site when the time comes (just hold the death threats!). Thanks.
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.