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
The page contents need to be loaded before trying to read them. Try
window.onload = function() { // run your script in here }
Or if you're using jQuery, prefer
$(document).ready(function() { ... }