Reputation: 8774
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.
Upvotes: 0
Views: 101
Reputation: 67892
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
Upvotes: 1
Reputation: 49114
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
Upvotes: 1