catch popups

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Cainnech
    New Member
    • Nov 2007
    • 132

    catch popups

    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:
    Code:
    window.onerror = "error";
    function error()
    {
    return true;
    }
    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
    Recognized Expert MVP
    • Nov 2006
    • 16032

    #2
    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.

    Comment

    Working...