[thelist] Dynamic form fields with Javascript

Lachlan Cannon tiedefenderdelta6 at yahoo.com
Wed Jan 23 05:56:05 CST 2002


You could always use nodes, and thw W3C DOM... that should
work quite well, however I don't know about how you'd do
something like that on the legacy DOMs.

Also, wouldn't it be
document.forms["main"].elements[document.forms["main"].elements.length].name="newField";..
no +1? Baring in mind that Javascript arrays are 0 based.

If you need help with the W3C DOM, then the chapter about
it, from the JS definitive guide 4th edition is available
as a sample from O'Reilly. (It mentions PPK's site too, and
no doubt you'll find something relevant there too).

http://www.oreilly.com/catalog/jscript4/chapter/ch17.html

HTH

Lach

__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/




More information about the thelist mailing list