From 08eab84127a93ce2a71ec8655b0eaa3d2044b4e7 Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Fri, 2 Oct 2009 14:55:40 +0000 Subject: - Patch #556438 by rfay, effulgentsia, sun | quicksketch, Rob Loach, Dries, sun.core, Damien Tournoud: Fixed AJAX/AHAH 'callback' support only works for 'submit' and 'button' elements - Should work for all triggering elements. --- misc/ajax.js | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'misc/ajax.js') diff --git a/misc/ajax.js b/misc/ajax.js index 378b1b833..79217dfd6 100644 --- a/misc/ajax.js +++ b/misc/ajax.js @@ -183,6 +183,10 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) { // Disable the element that received the change. $(this.element).addClass('progress-disabled').attr('disabled', true); + // Server-side code needs to know what element triggered the call, so it can + // find the #ajax binding. + form_values.push({ name: 'ajax_triggering_element', value: this.formPath }); + // Insert progressbar or throbber. if (this.progress.type == 'bar') { var progressBar = new Drupal.progressBar('ajax-progress-' + this.element.id, eval(this.progress.update_callback), this.progress.method, eval(this.progress.error_callback)); -- cgit v1.2.3