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.
Charles P.
On Apr 2, 5:07 pm, nwhite <changereal...@gmail.com> wrote:
> http://mootools.net/shell/AuTAm/
>