Aaron Saray

open source programmer,
web developer

entrepreneur, author
and musician

My Blog

contains PHP, Web and business/entrepreneurial related content. Please join in the conversation!

Unknown function _popupControl()

In my Javascript Error Handler post, I discussed how I track user and client side errors. Recently, my error logs became inundated with tons of javascript errors. The function _popupControl() is undefined. After a little googling, I found out that the CA Personal Firewall is responsible for inserting the following code into every page:

?View Code JAVASCRIPT
1
<script type="text/javascript">_popupControl();</script>

Well, for whatever reason, that software is no longer providing that function to the page. Not sure about the inner workings. My concern is that Internet Explorer is generating a popup error on the page, however. This would make it look like my page is erroring out. Or even worse, it may stop other scripts.

I’ve implemented a work around, and I’m curious how well it will work. My javascript now includes this code:

?View Code JAVASCRIPT
1
2
3
    if (typeof _popupControl != 'function') {
        var _popupControl = function() {};
    };

This script simply checks to see if the _popupControl() function is defined. If it is not, it assigns it to an anonymous function that does nothing. Curious to see if this will work…

This entry was posted in javascript and tagged . Bookmark the permalink.

3 Responses to Unknown function _popupControl()

  1. Mike Quale says:

    Maybe it will work, but that’s not very exciting, you should test if that function exists and redirect the user to NOD or AVG and warning the user that CA is such a crappy product.

    Think of the affiliate monies to be had!!! Oh Joy!

    • Aaron says:

      @Mike Quale: Hah! Funny. I’ve thought about that… but decided I’d rather not move people away from my content. Thanks for the idea though!

  2. Pingback: Making Friendly Javascript Errors – Client and Server | Aaron Saray

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>