Connecting Tech Pros Worldwide Help | Site Map

catch popups

Member
 
Join Date: Nov 2007
Posts: 56
#1: Nov 19 '08
Hi,

I've written an HTA that logs content of a website. Everything is working fine except I regularly get alert boxes with the text: "This page may contain a securityrisk. Do you wish to continue?" (Note that I translated it into English because windows is in Dutch with me, so the text may not be completely accurate)

Now since I have to confirm every time it means that my script is halted. Now I was looking for some scripts on the net and I came across some possible scripts but none of them seem to work for me. Right now I have:
Expand|Select|Wrap|Line Numbers
  1. window.onerror = "error";
  2. function error()
  3. {
  4. return true;
  5.  
But this can't stop it. Now it might be worth pointing out that these errors occur mostly when the page is already loaded into the iframe.

Does anybody know of a way that can block this kind of messages in my HTA?

Sincerely,
Kenneth
acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,581
#2: Nov 19 '08

re: catch popups


Since this is a browser warning, you won't be able to prevent it with a script.

See if you find this link (HTAs) useful.
Reply