3.0 beta 2

newb here, how do i best reference dynamically created form elements?

Hi,

I'm new to web development, so I'm struggling to learn some basics.

I have a form. In this form is a select box. Selecting a certain option in that select box causes new form elements to appear underneath. Select any of the other options will remove them. This works fine.

My problem is, how do I best reference these new inputs once there created? So far, the only way I can reference them is by using the DOM tree, which is very code heavy (formName.childNodes...). If I try to do something like, formName.elementName, or formName.elements['elementName'], it returns a null object. There must be a better way to reference them, and I'm just too inexperienced to know what it is.

In the form, for layout I'm using a table structure, so the inputs aren't direct children of the form, making referencing them with DOM tree likely to give me carpel tunnel from all the typing I'd be doing.

Any help would be very appreciated.

Thanks,
Mike
Mike
January 20,
I'm sorry, I thought this was a forum for javascript. I see now it's for ActiveWidgets. I clicked the first forum that popped up on Google. My apologies.

Mike
Mike
January 20,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.