The Motley Fool Discussion Boards

Previous Page

Computers, Phones & Internet / Webmaster's Corner

URL:  http://boards.fool.com/well-i-got-it-fixed-i-was-having-a-completely-30180782.aspx

Subject:  Re: HTML / Javascript question Date:  8/1/2012  2:30 PM
Author:  DoLoop Number:  16325 of 16444

Well, I got it fixed.

I was having a completely unrelated problem that I finally narrowed down to this same GetElementById issue. In this 2nd case, I was trying to get the status of a checkbox (using vbscript). Part of the statement was: "document.getElementById.ckbxABC.checked". This generated the same kind of error.

The fix for all of this that I stumbled across was to replace "GetElementById" with "all". So "document.getElementById[fldID].focus" became "document.all[fldID].focus". And, "document.getElementById.ckbxABC.checked" became "document.all.ckbxABC.checked". When coded this way, everything works just fine.

I can't explain it - but it works so I'm going to go with it.

BTW, dsbrady, this is all part of an in-house setup that is not available for access over the internet.
Copyright 1996-2014 trademark and the "Fool" logo is a trademark of The Motley Fool, Inc. Contact Us