473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

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.
[HTML]<script type="text/javascript" language="JavaScript">
<!--

function detectPopupBlocker() {
var myTest = window.open("about:blank","","directories=no,heigh t=100,width=100,menubar=no,res izable=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>[/HTML]

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('Test!') 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
Feb 14 '07 #1
6 1881
acoder
16,027 Expert Mod 8TB
Use the other way round, i.e. test for myTest, e.g. try the following:
Expand|Select|Wrap|Line Numbers
  1. function detectPopupBlocker() {
  2. var myTest = window.open("about:blank","","directories=no,height=100,width=100,menubar=no,res   izable=no,scrollbars=no,status=no,titlebar=no,top=   0,location=no");
  3. if (myTest) {
  4. myTest.close();
  5. alert("No popup blocker was detected.");
  6. } else {
  7. alert("A popup blocker was detected.Please allow this program to continue.");
  8. }
  9. }
  10. window.onload = detectPopupBlocker;
This works in Firefox.
Feb 14 '07 #2
thanks
but it doesn't work either. It's not only this script that doesn't work. Even a simple alert() kept at the head tag doesn't work. But when I open the script on the site I took from works. Not on my pages?!!!
Feb 14 '07 #3
acoder
16,027 Expert Mod 8TB
Create a dummy page which only contains simple Javascript. Does it work? If not, you may need to check your browser settings. If it does work, there is a problem with the code on your page.
Feb 14 '07 #4
Create a dummy page which only contains simple Javascript. Does it work? If not, you may need to check your browser settings. If it does work, there is a problem with the code on your page.
The script works when the popup blocker is disabled or the page/file is allowed. Otherwise, it doesn't ?
Feb 15 '07 #5
The script works when the popup blocker is disabled or the page/file is allowed. Otherwise, it doesn't ?
okay now I found something. the browses "Allow active content to run in files on My Computer" was not clicked when I select that the script will run.

Now my problem is that I am going to run the pages from CD. Can I make a prompt to the user to modify this without going through all the menus.

I check on other application CD and it has prompt that asking you to modify this.

"Active content can harm your computer or disclose personal information. Are you sure that you want to allow CDs to run active content on you computer?"

how can I prompt the user when the CD autorun?
Feb 15 '07 #6
acoder
16,027 Expert Mod 8TB
This is a Windows/Microsoft/IE problem. One workaround is to use shellRun for your CD. See this link.
Feb 16 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

13
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
38
by: Shaun McKinnon | last post by:
HI...Here's my problem...I have a popup window that loads when i want it to, but it's not sized properly. I've set the size, but it doesn't seem to work. I've been on 8 different websites to find...
8
by: Bijoy Naick | last post by:
It seems like the BBC sports site is able to get past popup blockers.. For eg.. http://news.bbc.co.uk/sport1/hi/cricket/default.stm. Click on the Video icon under "Watch and Listen" - right hand...
2
by: QA | last post by:
http://www.popupcheck.com/popup_manual/modeless.asp can still have a popup even when I have a popup blocker - google toolbar. I want to know the technology, but I can not read the source code....
26
by: Raffi | last post by:
Hi, We have a database application that runs in a popup Internet Explorer application window. The reason for this is to isolate the casual user from the address bar and the typical IE navigation...
9
by: Rathtap | last post by:
I want to popup a window from my codebehind. The reason is that during the postback the code needs to do some validations and to build the arguments that are passed in the url. How can I achieve...
7
by: anthony.turcotte | last post by:
Hi, I've looked for a solution to this problem on google, read posts in this newsgroup and I still haven't found anything that could help me. Here's the scenario. 1. User accesses...
7
by: rob c | last post by:
Hi Does anyone know what triggers a "popup blocker"? I'm going to be opening some sub-windows from my main page and don't want to get caught in a blocker. Thanks Rob
4
by: vickeybird | last post by:
I want to know if it is possible to detect if Pop up Blocker is enabled without trying to open a Pop Up windows. I'm trying to create a web analytics script and visible Pop up in case of disabled...
3
by: Yisehaq | last post by:
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.