summaryrefslogtreecommitdiff
path: root/misc/ajax.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/ajax.js')
-rw-r--r--misc/ajax.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/misc/ajax.js b/misc/ajax.js
index f8e3ee6d3..1d6c8295d 100644
--- a/misc/ajax.js
+++ b/misc/ajax.js
@@ -200,6 +200,12 @@ Drupal.ajax.prototype.beforeSubmit = function (form_values, element, options) {
// Disable the element that received the change.
$(this.element).addClass('progress-disabled').attr('disabled', true);
+ // Prevent duplicate HTML ids in the returned markup.
+ // @see drupal_html_id()
+ $('[id]').each(function () {
+ form_values.push({ name: 'ajax_html_ids[]', value: this.id });
+ });
+
// 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));