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
You never checked getElementById(...)
for NULL
.
You checked getElementById(...).value
for NULL
, and divs don't have a "value".
Also note that you forgot to close that tag, which is illegal in your XHTML... and used an SVG doctype for some reason. SVG is not HTML.
It's not really clear what you're trying to do here.