IE8: Invalid Argument, Line 256, char 15

Any idea what is causing this? No problem in FF

Trackback URL for this post:

http://www.ruzee.com/trackback/258

Re: IE8: Invalid Argument, Line 256, char 15

I've had the same problem for IE8. After some testing I found that the error occurs when in:

mwc.childNodes[i].style.height = (el.offsetHeight - bh - th) + "px";

the outcome of (el.offsetHeight - bh - th ) smaller than 0 is.

I replaced the code with:

var sum = el.offsetHeight - bh - th;
mwc.childNodes[i].style.height = (sum < 0 ? 0 : sum) + "px";

I honestly don't know whether this is the correct solution, but the error disappeared, and I've (so far) not seen any wrong rendering.

I remember I had the same error also somewhere else in the script. There I did the same <0 check.

Piotr

PS: Steffen fyi: It is pretty hard to comment without triggering the spam filter.

I had the same problem on

I had the same problem on IE7. The modified code did the trick.

Thank you for the tip.

Frank

Look at your DOCTYPE and

Look at your DOCTYPE and DOCTYPE of test page....