I realise this is not the ideal place to ask about this in terms of searchability, but I\'ve got a page whose JavaScript code throws \"Stack overflow in line 0\" errors when
I don't know what to tell you, but the same problem occured with jQuery table sorting and SEARCH. When there is nothing left in the table, where you are searching a string for example, you get this error too. Even in Google Analytics this error occurs often.
display a notification about every script error
In my case I had two functions a()
and b()
. First was calling second and second was calling first one:
var i = 0;
function a() { b(); }
function b() {
i++;
if (i < 30) {
a();
}
}
a();
I resolved this using setTimeout
:
var i = 0;
function a() { b(); }
function b() {
i++;
if (i < 30) {
setTimeout( function() {
a();
}, 0);
}
}
a();
My was "at line 1" instead but...
I got this problem when using jQuery's .clone
method. I replaced these by using making jQuery objects from the html string: $($(selector).html())
.
If you came here because you had the problem inside your selenium tests:
IE doesn't like By.id("xyz")
. Use By.name, xpath, or whatever instead.
I have reproduced the same error on IE8. One of the text boxes has some event handlers to replace not valid data.
$('.numbersonly').on("keyup input propertychange", function () {
//code
});
The error message was shown on entering data to this text box. We removed event "propertychange" from the code above and now it works correctly.
P.S. maybe it will help somebody