summaryrefslogtreecommitdiff
path: root/misc/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ajax.js')
-rw-r--r--misc/ajax.js4
1 files changed, 4 insertions, 0 deletions
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));