If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

1. Why are you trying to use .id if you want to access the value? Why not use .value?
2. In II: You assigned an event handler using one of the onxxxxx attributes. In that case the context for the function does not change to be a reference to the DOM object, so "this" will be a reference to the window object instead.
3. In III: getElementsByTagName (mind the 's') will return a collection of DOM objects which is essentially an array. In order to retrieve the first object from the array, you will have to use the index [0] on it