If you use getElementById you must have an id, if you only have a name use getElementByName.

hope this helped.