[thelist] javascript and form fields with numeric ID/name

Matt Warden mwarden at gmail.com
Thu Dec 2 12:59:04 CST 2004


Joel,

On Thu, 2 Dec 2004 10:36:41 -0800, Joel D Canfield <joel at spinhead.com> wrote:
> Does javascript choke on a field id/name which begins with a numeric
> character? (like 010010CompanyName)
> 
> If so, is there an workaround? Really wanted to be able to sort/group
> using the field id on the back end

well, you could always just prepend the id with a character. If the
character is the same, it won't affect sorting:

a010010CompanyName
a011010CompanyName
etc.

also, have you tried accessing the form element by the elements array?

document.forms[0].elements['010010CompanyName'].value
etc.

?

hth,


-- 
Matt Warden
Miami University
Oxford, OH
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list