By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,956 Members | 1,722 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,956 IT Pros & Developers. It's quick & easy.

false popup not allowed?

P: n/a
I have disable my firewall, virus software, google pop up allowed, ie6 popp
up checker disabled.
Is there an other one?

This script tels me :
"Pop-up windows are blocked. Please disable your popup blocker in order to
use the site.".

function POPRESULT(POP,NIS){
if (POP&&!NIS) {
xPopTested = true;
ShowMessage();//alert("All pop-up windows are supported.");
} else if (NIS) {
alert("Norton Internet Security has been detected. This may be disable
some pop-up windows. Please disable this feature for this site.");
} else {
alert("Pop-up windows are blocked. Please disable your popup blocker in
order to use the site.");
}
}
function POPTEST(){
try{
if(!xPopTested)
{
window.focus();
xWin=window.open("popuptest.htm","xWin","top=5000, left=5000,width=100,height=100");
setTimeout("test_xWin()",700);
}
else ShowMessage();
}catch(e){}
}
function test_xWin(){
is_ie=false;
is_mac=false;
PWOBJ=typeof(window.open);
if (document.body&&typeof(document.body.innerHTML)!=" undefined"){
PAGE=document.body.innerHTML.toLowerCase();
}
// DETECT NORTON INTERNET SECURITY
if
((window.SymWinOpen)||(window.SymRealWinOpen)||(PA GE.indexOf("symrealwinopen")!=-1)||((PWOBJ.indexOf("function")!=-1)&&(!is_mac&&is_ie)))
is_nis=true;
// DETECT POP-UP KILLERS
else if ((xWin==null)||(typeof(xWin)=="undefined")||(!POPW RITE))
xWindow=false;
// POP-UP SUCCESSFUL
else xWin.close();
POPRESULT(xWindow,is_nis);
}
var xPopTested=false;
var xWin=null;
var xWindow=true;
var x=null;
var PWOBJ=null;
var is_ie=false;
var is_mac=false;
var is_nis=false;
var PAGE="";
var POPWRITE=false;

Thanks for your attention
--
Jean Pierre Daviau
--
Easyphp1.8
Apache1.3.24
DEVC++, borland 5.5
windows Xp
asus p4 s533/333/133
Intel(R) Celeron (R) CPU 2.00 GHz
http://www.jeanpierredaviau.com
Jan 30 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
I corrected some problems on this script. It seems to work.
Advises please.
----------------------

<html>
<head>
<title>check pop up</title>

<SCRIPT type="text/javascript" language="JavaScript">
<!--
var xPopTested=false;
var xWin=null;
var xWindow=true;
var x=null;
var PWOBJ=null;
var is_ie=false;
var is_mac=false;
var is_nis=false;
var PAGE="";
var POPWRITE=false;

function ShowMessage(){
alert("All pop-up windows are supported.");
}
function POPRESULT(POP,NIS){
if (POP &&! NIS) {
xPopTested = true;
ShowMessage();
} else if (NIS) {
alert("Norton Internet Security has been detected. This may be disable
some pop-up windows. Please disable this feature for this site.");
} else {
alert("Pop-up windows are blocked. Please disable your popup blocker in
order to use the site.");
}
}
function POPTEST(){
try{
if(!xPopTested)
{
window.focus();
xWin=window.open("popuptest.htm","xWin","top=5000, left=5000,width=100,height=100");
setTimeout("test_xWin(xWin)",700);
}
else ShowMessage();
}catch(e){}
}
function test_xWin(xWinin){
is_ie=false;
is_mac=false;
PWOBJ=typeof(window.open);
alert(xWinin.document.body.innerHTML);
if (document.body && typeof(document.body.innerHTML)!="undefined"){
PAGE=document.body.innerHTML.toLowerCase();
}
// DETECT NORTON INTERNET SECURITY
if
((window.SymWinOpen)||(window.SymRealWinOpen)||(PA GE.indexOf("symrealwinopen")!=-1)||((PWOBJ.indexOf("function")!=-1)&&
(!is_mac&&is_ie))) {
is_nis=true;

// DETECT POP-UP KILLERS
}else{
if ((xWin==null)||(typeof(xWin)=="undefined")) {//||(!POPWRITE)
xWindow=false;
}
// POP-UP SUCCESSFUL
else{
xWin.close();
}
}

POPRESULT(xWindow,is_nis);
}
//-->
</SCRIPT>
</head>

<body onLoad="POPTEST()">

</BODY>
</HTML>
---------------------------------
Jan 30 '06 #2

P: n/a
Jean Pierre Daviau said the following on 1/30/2006 5:34 PM:
I corrected some problems on this script. It seems to work.
Advises please.


<snip>

IE6 WinXP SP2 gives an error of permission denied.

Gives a false positive with the AOL Popup Blocker in AOL9.0 as well.

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Jan 30 '06 #3

P: n/a
The goal of this script is to test if the pop ups are allowed. I tried it
with IE6, Opera and Mozilla everything OK. For the others I dont have them.
IE6 WinXP SP2 gives an error of permission denied. ??It does not gives this?
alert("Pop-up windows are blocked. Please disable your popup blocker in
order to use the site.");

Gives a false positive with the AOL Popup Blocker in AOL9.0 as well.

Is this another one?

I added a window.opener.POPWRITE = true; in popuptest.htm
if ((xWin==null)||(typeof(xWin)=="undefined")||(!POPW RITE)
) {
xWindow=false;
}

Thanks
Jan 31 '06 #4

P: n/a

P: n/a
> "Jean Pierre Daviau" <On**@WasEno.ugh> wrote:
news:qY********************@wagner.videotron.net.. ..

You can try it there:

http://www.jeanpierredaviau.com/noname3.html


Ad Muncher seems to block it all, no alerts, no popups.

Only used for testing, never updated, default settings.

Ad Muncher Usage Statistics for v4.6 Build 10270
Adverts removed by Ad Muncher: 47,938
Approximate bandwidth saved: 374 MB
Counter started: May 25, 2005

--
BootNic Tuesday, January 31, 2006 5:12 PM

If we were not meant to make mistakes we would not have a Department of Corrections.
*Unknown**

Jan 31 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.