"Document.value" ERROR in IE11
Hi everyone, I'm having issues with thit piece of code:
Code:
if (document.bandform.bandmail.value.length==0){
document.getElementById('bandmaillabel').style.color = "red";
document.bandform.bandmail.focus()
return false;
}
This works in all the browsers, except IE11, I've run the debugger in IE11 and I got this: ""Unable to obtain the property 'value', null reference or not defined".
Why? Thanks so much.
Re: "Document.value" ERROR in IE11
How is your <form> tag defined? Do you have both the id and name attributes for it?
http://stackoverflow.com/questions/7...e-is-undefined
Re: "Document.value" ERROR in IE11
Quote:
Originally Posted by
tr333
Thanks for answering! I found the problem, the ID and NAME tags had the same value and IE took the ID value instead of taking the NAME, so It returned a Null. But I still don't know why only IE returned Null, all other browsers worked fine.