I'm trying to get the element with getElementById(), but it returns null.
This is the error I get on mozilla firefox debugger
"TypeError: document.getElementById(...) is null".
What is wrong in the code?
Stack
Frame One
Frame Three
Frame Two
Answer
top
appears to be a reserved variable -- it resolves to window.top
in your function. Try naming top
something else like _top
and you shouldn't get any errors.
No comments:
Post a Comment