Connecting Tech Pros Worldwide Forums | Help | Site Map

popup blocker blocks javascript

Newbie
 
Join Date: Feb 2007
Posts: 8
#1: Feb 14 '07
Hi guys

I am trying to prepare few html pages which contain OLAP cubes on a CD. The problem I have is that the popup blocker blocks the OLAP modules from being shown. Therefore, I wanted to write script that will check if the popup blocker is enabled and tell the user to allow the site. I tried my own scripts and after several tries I looked for better scripts on the web. I ended up with this one but the problem is the same.
<script type="text/javascript" language="JavaScript">
<!--

function detectPopupBlocker() {
var myTest = window.open("about:blank","","directories=no,heigh t=100,width=100,menubar=no,resizable=no,scrollbars =no,status=no,titlebar=no,top=0,location=no");
if (!myTest) {
alert("A popup blocker was detected.Please allow this program to continue.");
} else {
myTest.close();
alert("No popup blocker was detected.");
}
}
window.onload = detectPopupBlocker;
//-->
</script>

the JAVASCRIPT DOESN"T RUN WHEN THE POPUP BLOCKER IS ON. Therefore, it is not able to tell the user to allow the site. But the script works perfectly it the blocker is off! its show the message there is no popup blocker.(What's the use!). When the popup blocker is on, even a simple alert('I am in a dip shit!') doesn't run. Please Helpppppppppppp.
The other related question I have, Can I allow all the CD to be allowed by the popup bloker rather than on a page basis.
Hope to find the solution
Yisehaq

bartonc's Avatar
Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Posts: 6,400
#2: Feb 14 '07

re: popup blocker blocks javascript


The Javascript forum is here. Try posting your question there. This is the sys/admin for Windows forum. Not many programmers check here regularly. Good luck.
Newbie
 
Join Date: Feb 2007
Posts: 8
#3: Feb 14 '07

re: popup blocker blocks javascript


thanks I have posted it there
bartonc's Avatar
Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Posts: 6,400
#4: Feb 14 '07

re: popup blocker blocks javascript


Quote:

Originally Posted by Yisehaq

thanks I have posted it there

You are welcome. It looks like it may have turned out well. acoder has already replied there.
Reply


Similar Microsoft Windows / Vista / XP / ME / 95 & 98 bytes