[thelist] Forms and getElementById

Tom Dell'Aringa pixelmech at yahoo.com
Wed Jan 29 10:31:01 CST 2003


--- Rob Whitener <rwhitener at DesignOptions.com> wrote:
> var tag = document.forms[0].getElementById("e_mail");

Rob, I've not seen GEBId used this way, maybe this is why..try:

var tag = document.getElementById("e_mail");

The method doesn't need to enter into the forms array to find an item
by the id (thus the name). You can access your tag directly by id.

HTH

Tom

=====
var me = tom.pixelmech.webDeveloper();

http://www.pixelmech.com/
http://www.maccaws.com/
[Making A Commercial Case for Adopting Web Standards]

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com



More information about the thelist mailing list