Use document.getElementById ?

By mkgobaco

When I’m debugging someone else’s Javascript, I can usually fix the problem by changing dot references to a call to getElementById first.  No more memorizing the structure of the page and no more “binding” the code to the structure of the page.  getElementByid will find the element if it has a name.

Leave a Reply