Forum Moderators: open
[webmasterworld.com...]
anyway, I do get these stack overflow errors in IE when running a javascript script, but it happens only with IE6. I track the number of times various page-loading procedures are called, and indeed, I can see why IE6's stack is overflowing; but why ONLY IE? For example, one procedure that gets called 19 times during page load in Firefox gets called 751 times during page load in IE. And that's only one of several procedures with that discrepancy in IE versus the other browsers I test on. If the code flow was at fault, this should be happening regardless of browser, no?
at this point I'm baffled, so any pointers to what's the best direction to go from here are appreciated. Thanks...
one procedure that gets called 19 times during page load in Firefox gets called 751 times during page load in IE.
This alone tells you (of course) it's going into a loop. Why?
Your programming probably expects values from certain conditions. That is, if I have a <p> and it's id'ed test I would expect if I have var con = document.getElementById('test').innerHTML, it would store the content of that paragraph in the variable con.
But what if the browser doesn't recognize the .innerHTML attribute, or even document.getElementById? Then you get nothing, or an error.
I'm suggesting that there is some reference in your code **without proper error trapping** that is expecting a value or object, and in IE6 it's not finding it. It's not erroring, it's executing the request recursively until you get a memory error. For example, IE6 does not support min-width or max-width, if you try to access that property in IE it will error.
Try digging around in your script that way, look for references to the document's elements.
The only other explanation I can come up with is that IE's javascript run-time is not executing the code sequentially, which sounds pretty bizarre. I'm fairly new to javascript, and I'm not a professional. Am I in error assuming that it's execute sequentially?
I keep a machine with IE6 running, I may have time to look.
Thanks again for your responses. :-)