formAPI
Towards an AHAH framework / automatic javascript generation
Submitted by tao on Sun, 2007-02-11 19:00.I have been having some really exciting ideas about getting the formAPI to generate the bindings to the javascript. I realized that all the javascript I wrote for the tutorial module could be generalized. Then with a bit of glue code, all of the parameters needed to do the event binding could be put in a properties set on the form element. This way Drupal coders could create modules with sophisticated AHAH effects without needing to write any Javascript at all. Here is an example of a button declaration with all of the info needed to do a incremental page update:
A dynamically expanding AJAX/AHAH Drupal form element.
Submitted by tao on Fri, 2007-02-09 19:29._*Update*: I stand by most of the information in this article, but I have learned a couple of things in the last two month. I now recommend against pulling information directly out of $_POST or using form_builder. My Ahah Forms package can make a lot of this easier. Please checkout Secure Dynamic Forms and Subforms, Ahah_forms reloaded, and the examples in the Ahah Forms package._
Goal
To create a form widget that consists of an unlimited number of subwidgets, expands without needed a full page refresh, and can be easily added multiple times into any Drupal form.
Plan
Use hook_element to define the element, hook_nodeapi to handle the db interactions, and jQuery-based AHAH code to do the incremental page updates (AHAH – Asynchronous HTTP And HTML , not AJAX b/c there is not XML involved, and people seem to think AJAH isn’t sexy enough).
Recent comments
4 hours 19 min ago
4 hours 22 min ago
4 hours 25 min ago
9 hours 36 min ago
10 hours 32 min ago
11 hours 47 min ago
14 hours 34 min ago
2 days 19 hours ago
3 days 3 hours ago
1 week 4 days ago