MOOTools/AJAXian way to dynamically build forms

5 views
Skip to first unread message

Charles Parcell

unread,
Apr 2, 2010, 4:00:10 PM4/2/10
to MooTools Users
The topic I am asking about is not MOOTools specific, but I am want to
build it within MOOTools so it is relative.

I have been an old school fool for a long time. Been getting wet in
MOOTools to build a pseudo web application. Basically, I want to know
how I can build my form the "proper".

Here is the info about my question.

I am going to have a list of X items to present. Each item will be
presented in a row containing a checkbox, label, and data control
(either text, textarea, select, or checkbox).

The checkbox, that each item has, is a toggle which will disable (or
not) the data control. If it is checked then the user can manipulate
the data control. If not, the data control is disabled.


I have already build this, but using old methods of construction. For
instance, I am a select performing an addEvent, but I have a switch
statement within that is checking for each row item by name
explicitly. While this is possible for my static first attempt, it
becomes impossible when I introduce a dynamic list of data.

I want to get an idea of how I should be building my javascript. I
assume that I should write a single selector that performs an addEvent
for each disabling checkbox in the row that links to the data control
via another selector. What would the "proper" way be, to construct my
row (<div> tags) and write the addEvent function.

Sorry if this sounds disjointed. I am probably not using the proper
grammar to identify each element and task.

Any help, even if just a link, would be welcome.

Charles P.

nwhite

unread,
Apr 2, 2010, 5:07:13 PM4/2/10
to mootool...@googlegroups.com
http://mootools.net/shell/AuTAm/



--
To unsubscribe, reply using "remove me" as the subject.

Charles Parcell

unread,
Apr 2, 2010, 10:36:47 PM4/2/10
to MooTools Users
Winner! More than I expect! Many thanks.

Charles P.


On Apr 2, 5:07 pm, nwhite <changereal...@gmail.com> wrote:
> http://mootools.net/shell/AuTAm/
>

Reply all
Reply to author
Forward
0 new messages