0

I have a development site which seems to have an intermittent Javascript error in IE7. Now I can fully test IE7, but I was wondering if there is a resource that would allow me to analyze the Javascript for possible browser issues.

4 Answers 4

1

You can try running your javascript through JSLint

Sign up to request clarification or add additional context in comments.

Comments

1

A common IE-only problem is the inclusion of closing commas in array or object literals. Non-IE browsers handle this fine.

Are you generating any array or object literals via a JSON response or similar?

Eg

a = [1,2,4,]; // error in IE, not in other browsers
b = {a: 1, b: 2,}; // also error in IE 

1 Comment

This is especially terrible if it's part of inline JS in an AJAX'd JSP, as IE gives no indication as to the actual line number of the problem.
1

Look for any code that runs as the page loads.

ex:

<script src = "test.js"></script>

test.js

document.getElementById("whatever");

Depending on the speed of the JS interpreter, you'll get a race condition with the loading of the script vs. the loading of the DOM. If the issue is "intermittent", this is almost certainly the problem. Stick everything that looks at the DOM in $(document).ready

1 Comment

Yes, I've had this problem with IE too. The IE interpreter is so amazingly slow compared to other browsers, you can run into race conditions you don't see elsewhere.
0

You may wish to try using Selenium for scenario tests as well.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.