I am quite new with Javascript and I got a problem with document.getElementById() that always returns NULL, and that\'s driving me nuts.
I have a element in my code
if(document.getElementById("arect").value == null){
alert('NULL >> '+ xx.value);
}
This code always returns null or error. If you want to see if the object exists, do the following....
if(xx == null)
alert('Object does not exist');
else
alert('Object exists. Inner HTML: ' + xx.innerHTML);
Also, div
does not have value
. If you want to get the html inside div, use xx.innerHTML