Connecting Tech Pros Worldwide Help | Site Map

popup blocker blocks javascript

 
LinkBack Thread Tools Search this Thread
  #1  
Old February 14th, 2007, 06:19 AM
Newbie
 
Join Date: Feb 2007
Posts: 8
Default popup blocker blocks javascript

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
Reply
  #2  
Old February 14th, 2007, 06:41 AM
bartonc's Avatar
Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 46
Posts: 6,400
Default

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.
Reply
  #3  
Old February 14th, 2007, 08:10 AM
Newbie
 
Join Date: Feb 2007
Posts: 8
Default

thanks I have posted it there
Reply
  #4  
Old February 14th, 2007, 09:23 AM
bartonc's Avatar
Moderator
 
Join Date: Sep 2006
Location: Minden, Nevada, USA
Age: 46
Posts: 6,400
Default

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
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.