w2form.action

Called when user clicks form's button.
action(action, [event])
action string, name of the action (name of the button)
event object, DOM Event Object (optional)
Returns undefined.

Description

The first argument action is the name of the action (name of the button). The second argument event is DOM event object. This method does not do anything besides calling appropriate action handler from the .actions object and triggering .onAction event. When form initializes it adds action on click event to all buttons in the form.
If you have form defined in the following way: You can do:

User Comments

comments powered by Disqus