The Motley Fool Discussion Boards

Previous Page

Computers, Phones & Internet / Webmaster's Corner

URL:  http://boards.fool.com/first-try-to-avoid-using-documentall-if-you-can-30180810.aspx

Subject:  Re: HTML / Javascript question Date:  8/1/2012  2:43 PM
Author:  dsbrady Number:  16326 of 16453

First, try to avoid using document.all if you can. It's not really "proper" javascript (in that it was initially IE only and may not be supported by all browsers).

But, now that I'm looking more closely at your initial code, here's the problem:

You had this:
document.getElementById[fldID]
document.getElementById.ckbxABC

getElementById is a function, so it needs to be this:
document.getElementById(fldID)
document.getElementById('ckbxABC');

Try that and it should work in any browser since IE5 on.

dsbrady
Copyright 1996-2014 trademark and the "Fool" logo is a trademark of The Motley Fool, Inc. Contact Us