Search
Code Directory
 ASP
 ASP.NET
 C/C++
 CFML
 CGI/PERL
 Delphi
 Development
 Flash
 HTML
 Java
 JavaScript
 Pascal
 PHP
 Python
 SQL
 Tools
 Visual Basic & VB.NET
 XML
New Code
HTMLPad 2018 15.0
Database Workbench Pro 5.4.2
Aqua Data Studio 18.5
SugarCRM Survey Rocket Plugin 1.0
TapCRM - Mobile CRM App for SugarCRM & SuiteCRM 1.0
Dynamics CRM Inventory Manager Plugin 1.0
Overstock Script 1.0.3
C# HTML to PDF 4.4.6.2
AnyGantt JS Gantt Charts 8.2.0
SentiVeillance SDK Trial 6.0.176566
Popup extension for Magento 2 2.2.x
Excel Add-in for Shopify 1.7
PHP Classified Script 1.0.3
Popup For Magento 2 2.2.x
Desktop Live Streaming SDK - Screen2Video Gold ActiveX 5.2
Top Code
MLM Binary Plan Script – i-Netsolution 1.0.2
HTMLPad 2007 Pro 8.3
Dynamics CRM Inventory Manager Plugin 1.0
iNetinfotech Online Bus,train,flight booking system script 1.6.3
Vote Servlet 1.IV
Examples7 Collection 1.5
Easynews PHP for Scripts 1.7.1
Ping Pong Game Code Script 1.1
imagetooth 0.2.0
XML utilities for MATLAB 6.1
p2cxx 1.0
MP3 Player (GUI) (Sripts) 1.0
Java-2-Pseudo 1.0
Matlab-GUI equity derivative calculator 1.0
BS/1 Accounting - Accounting Source Code
Top Rated
Output Messenger 1.8.0
Aliexpress Clone- Ec21 Script 1
Indiegogo Clone 3.0
PHP Image Resize Script 1.0
Best Spotify Clone 1.0
Get Random Record Based on Weight 1.0.0
Travel Portal Script 9.29
Magento Product Designer 1.0
OFOS - Just Eat Clone Script 1.0
PrestaShop Upload Images Module 1.2.1
Trading Software 1.2.4
Deals and Discounts Website Script 1.0.2
Readymade MLM Products 2.01
ADO.NET Provider for ExactTarget 1.0
Solid File System OS edition 5.1
AHAH helper 6.x-2.2
File ID: 98238






AHAH helper 6.x-2.2
Download AHAH helper 6.x-2.2http://drupal.org/project/view_revisions_by_content_typeReport Error Link
License: Freeware
File Size: 10.0 KB
Downloads: 1
Submit Rating:
AHAH helper 6.x-2.2 Description
Description: Drupal 6's Forms API is great, but its AHAH support (a technique similar to AJAX) is lacking. You have to write a menu callback for every AHAH-enabled form item of your form. This is time consuming, hard to maintain and hard to write tests for. Not to mention that the code for those menu callbacks is not easy to understand, yet always the same. ("What's that piece of code for?" d-deOCt "I'm not sure, it's just necessaryd-deTZ") See my blog post about this if you want more details: http://wimleers.com/blog/ahah-helper-module.
Notes about version 2

Version 2 of this module simplifies the usage a lot and contains a much improved example. My blog post is slightly outdated: in version 2, the #first_time property no longer exists: it was too cumbersome to use. Instead, validation is only performed when a button is pressed, not when an AHAH event fires because of a changed select, for example. See this issue for details.
Features

It allows you to:

1. not write any menu callback at all.
2. still not write any javascript at all.
3. have a sole, central form definition function that has some if-tests to support a changing form based on the user's input, i.e. by checking $form_state['values'] and/or $form_state['storage']. This is in fact the exact same system you've been applying if you've already written multi-step forms. This makes sense, because AHAH forms are in fact normal multi-step forms, that just happen to be updatable through AHAH as well.
You still have to use the #ahah property and set a wrapper, but you provide a "magical path" that will automatically rebuild and render the desired part of the form. If the part of the form that you want to be rendered is $form['fapi']['rocks'] then you would do 'path' => ahah_helper_path(array('fapi', 'rocks')) and that's it.
Adding graceful degradation just became really easy: just create buttons with the appropriate text, set '#submit' => array('ahah_helper_submit'), and off you go. You'd probably create such a button for every AHAH-powered form item. The exact same code will be used as when javascript would be enabled. (If you've got a AHAH-powered select called 'Usage', you'd probably name the button 'Update usage'. You get the point.)
And thanks to these buttons, writing functional tests now becomes trivial as well. Because the same code is used when javascript is disabled (through the buttons) or enabled (through AHAH callbacks), just press the buttons in your tests and you'll be fine!
4. skip form validation for all AHAH updates that do not call validate or submit callbacks.
5. have new AHAH-powered form items added in an AHAH callback (previously not supported).

Look at the included ahah_helper_demo module for an example.

License: Freeware

Related: Buttons, Write, you039ve, Tests, ahahpowered, callbacks, Callback, Button, vascript, Forms, Module, Property, enabled, Version

O/S:BSD, Linux, Solaris, Mac OS X

File Size: 10.0 KB

Downloads: 1



More Similar Code

This is a helper module that allows the returned data from an AHAH callback to specify the function to be called. It also allows an additional function to be called before AHAH submission. This module is used by the Autotag module.

Development of this module was carried out by Ben Scott, with minor additional development by Simon Rycroft and funded in part by the EDIT Scratchpads project



This helper class gives easy access to callback event data in GUIs developed using GUIDE. Several Handle Graphics callback functions, such as the uicontrol's KeyPressFcn and the figure's WindowScrollWheelFcn, pass useful information through the...



Ahah forms is a utility module, for adding Ajax/javascript driven incremental page reloading, without needing to write any javascript.

This framework uses the FormAPI to generate the necessary javascript. The key is the #ahah_binding...



Tweetbacks Helper is a helper Plugin for Tweetbacks Plugin to help it detect more tweets.

Features

This Plugin can disable Pseudo cron scheduler by Tweetbacks and replace it with its own scheduler, that can be invoked by...



Without this module, if during the processing of an AHAH callback, css files are added using drupal_add_css() but those files aren't already loaded on the base page from which the AHAH request originated, then those files don't get loaded. This is...



Without this module, if during the processing of an AHAH callback, javascript files are added using drupal_add_js() but those files aren't already loaded on the base page from which the AHAH request originated, then those files don't get loaded....



This module provides a way for modules to store information about the state of a page as it changes during AHAH callbacks. It provides no end-user functionality, but gives an API for other modules to use. Examples of modules using this are...



Mail Merger Helper simplifies the process of Mail Merge in Microsoft Word by allowing the user select a data source file and a MS Word document in the same screen.



This is a helper module for the DrupalMU installation profile.

Since DrupalMU has been replaced and is no longer maintained, this helper module isn't either.



The maintenance helper provides features to assist site admins in performing maintenance on their site. It provides a permission to login and allows admins to set a configurable message to appear on all pages of the site.

User Review for AHAH helper
- required fields
     

Please enter text on the image