ahah

Fix for Overriding ahah success function to alter Drupal.settings

  1. (function($) {
  2.  
  3. if (Drupal.jsEnabled) {
  4.   $(document).ready(function() {
  5.     if (Drupal.ahah != undefined) {
  6.        insert(cucumber).into(beaver);
  7.       /**
  8.        * Override of Drupal.ahah.pro

Fix for Overriding ahah success function to alter Drupal.settings

  1. (function($) {
  2.  
  3. if (Drupal.jsEnabled) {
  4.   $(document).ready(function() {
  5.     if (Drupal.ahah != undefined) {
  6.  
  7.       /**
  8.        * Override of Drupal.ahah.prototype.success.

Fixed AHAH Wysiwyg integration

  1. // $Id$
  2.  
  3. /*
  4.  This version works when the #ahah element is a button.
  5.  Drupal passes the button name and value to .ajaxSubmit
  6.  but when we re-serialize the form that data is lost so we
  7.  need to ad

Fix for AJAX/AHAH event handlers for Wysiwyg integration in D6

  1. // $Id$
  2.  
  3. /*
  4.   drupal_add_js(this_file) on the form for which this is needed.
  5.   Customize the CHANGE ME parts to deal with the relevant fields.
  6. */
  7.  
  8. /*
  9.  * Attach AJAX/AHAH event handlers for Wys

AJAX/AHAH event handlers for Wysiwyg integration in D6

  1. // $Id$
  2.  
  3. /*
  4.   drupal_add_js(this_file) on the form for which this is needed.
  5.   Customize the CHANGE ME parts to deal with the relevant fields.
  6. */
  7.  
  8. /*
  9.  * Attach AJAX/AHAH event handlers for Wys

Fix for Code

  1. <?php  
  2. /**
  3.  * Implementation of hook_form_alter().
  4.  * @see http://api.drupal.org/api/function/hook_form_alter
  5.  * We add a few custom fields to the default Drupal contact form
  6.  */

Code

  1. <?php  
  2.  
  3. function hookContact_menu()
  4. {      
  5.         $items['contact/js/addInfos'] = array(
  6.                 'page callback' => 'hookContact_addInfos',
  7.                 'type' => MENU_CALLBACK,
  8.                 'access callback' => TRUE,
  9.         );

I want to attach the value of the url from the text field to the function that i am calling(sitestats_stats()). Is this possible

  1. function sitestats_getform(&$form_state) {
  2.   $form = array();
  3.   $form['url'] = array(
  4.     '#type' => 'textfield',
  5.     '#title' => t('URL'),
  6.     '#default_value' => 'http://',

a 'hello world' example with AHAH

  1. function _update_available_vehicles_select_list() {
  2.   // We're starting in step #3, preparing for #4.
  3.   $form_state = array('storage' => NULL, 'submitted' => FALSE);

AHAH callback

  1. function ca_taxonomy_term_js() {
  2.   module_load_include('inc', 'ca', 'ca.admin');
  3.   $form_state = array('storage' => NULL, 'submitted' => FALSE);
  4.   $form_build_id = $_POST['form_build_id'];
Syndicate content