Click to See Complete Forum and Search --> : Error checking on external JS file


webbloom
01-22-2003, 12:02 PM
Here's the problem.

A 3rd party provider has the ability to track our Pay-per-click campaigns. To do this, we must include a call to an external JavaScript file.

Occassionally, the server where the external JavaScript file is located is down or inaccessible.

Is it possible to add some error checking to the JavaScript code that calls the external JavaScript file so that if the file does not load it does not crash your webpage?

Thanks,

David Delisle
WebBloom Designs

gil davis
01-22-2003, 01:32 PM
Write another script that tests if a variable used by the external script exists and put it in the file after the external one.

webbloom
01-23-2003, 12:59 PM
Thanks! I'll try that and see if it works.