Syntax and runtime error management with ajax/getScript includes.

Syntax and runtime error management with ajax/getScript includes.

I ran a couple of searches in the forum and I didn't find anything to help me.

I'm wondering if there is a predetermined way of validating syntax and runtime errors in .js files loaded with either the getScript or ajax methods.

At the moment, in my setup, firebug reports errors seemingly randomly in the head section of the current html page and does not point to the correct line in the external js file or at least understands where it comes from.

I know its not eval()-ing the code and that it just throws the code in a <script> tag that will be removed right after its done. However, commenting out the bit that removes the <script> so that the source JS is still there doesn't change a thing as far as resetting the error pointer to the right place.

I also tried a few try..catch statements but no luck either.

Any ideas? Thanks!

    • Topic Participants

    • frank