There is no getElementByName. There is getElement
sByName.
Guessing typo there.
getElementById gets an element via an id. getElementsByName returns an Array of elements by their name.
Some horrible browsers will use name if it can not find an id for getElementById and those browsers should be uninstalled and bytes burnt to a crisp.
Eric