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:
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:
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…

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!
@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!
Pingback: Making Friendly Javascript Errors – Client and Server | Aaron Saray