EDIT: i think the problem was i had an html element named 'comment' so IE was getting confused when i made a js variable 'comment'
(don't use IE it is the worst browser)
i am in the process of debugging a website, it works wel in Google Chrome and firefox but not in IE
i am putting all the relevant code below.
this is in the head tag, and is the only JavaScript executed when the debugger show the error
Code:
function first_run(){
answer_state=document.getElementById('state');//set node for 'show_answer' function
answer_ab=document.getElementById('ab');//set node for 'show_answer' function
answer_capitol=document.getElementById('capitol');//set node for 'show_answer' function
answer_next=document.getElementById('next');
comment=document.getElementById('comment')//line marked with error
ui=document.getElementById('UI');//sets 'ui' to form location
score_right=document.getElementById('right');//returns null
score_wrong=document.getElementById('wrong');
score_right=score_wrong.previousElementSibling//score_right work around
score_show_ans=document.getElementById('show_ans');
runs above code on page load
Code:
<body onkeydown="if (event.keyCode == 13){check()}" onload="first_run()">
in body tag, node that erred line refers to.
Code:
<div id=comment>
</div>
the error message in IE's developer tools debugger is "Object doesn't support this property or method" States javascript.html, line 395 character 1"
i've done all of my coding in Chrome and have no expirence in IE's syntax, any ideas what the problem is?