What is the meaning of "Invalid Argument" and what causes this error when debugging JavaScript in Internet Explorer? -
i getting error when using getelementbyid()
. won't post entire program since it's homework assignment, when comment out line of code don't more syntax errors. should looking in rest of code have caused problem?
document.getelementbyid("bugone").style.left = xpos + "px";
also- "invalid argument" error caused by?
"invalid argument"
going runtime error, not syntax error. don't jump getelementbyid()
culprit - have lot going on in 1 line of code. debugging, it's useful break complex statements:
var bugone = document.getelementbyid("bugone"); var left = xpos + "px"; bugone.style.left = left;
in ie8, if set bad value on style property, "invalid argument"
error. i'm guessing xpos
contains either undefined
or nan
. set breakpoint in debugger , examine value of xpos
.
Comments
Post a Comment