Home › Forums › JavaScript › Working on a B-tree form. › Reply To: Working on a B-tree form.
September 19, 2014 at 1:06 am
#183567
__
Participant
Ideas:
- make each of the “branches” just a map of attributes: whether it shows the next/prev/submit buttons, and a reference to the DOM Element (the
fieldset
) itself. (later, we will also add a.validation
method.) - abstract the process of switching between states so we can use a single event listener for all switches. This requires an event handler (
stateHandler
),currentState
andhistory
vars, and a function to actually handle classes, etc. (switchTo
).
(BTW translate
needs to be prefixed outside of FireFox)