#922796 by merlinofchaos: Fixed ajax.js ajax options are not dynamic.

merge-requests/26/head
Angie Byron 2010-10-06 17:58:25 +00:00
parent 95dc4dde40
commit 77ce3c6dd8
1 changed files with 4 additions and 4 deletions

View File

@ -127,7 +127,7 @@ Drupal.ajax = function (base, element, element_settings) {
// Set the options for the ajaxSubmit function. // Set the options for the ajaxSubmit function.
// The 'this' variable will not persist inside of the options object. // The 'this' variable will not persist inside of the options object.
var ajax = this; var ajax = this;
var options = { ajax.options = {
url: ajax.url, url: ajax.url,
data: ajax.submit, data: ajax.submit,
beforeSerialize: function (element_settings, options) { beforeSerialize: function (element_settings, options) {
@ -173,14 +173,14 @@ Drupal.ajax = function (base, element, element_settings) {
ajax.form.clk = this.element; ajax.form.clk = this.element;
} }
ajax.form.ajaxSubmit(options); ajax.form.ajaxSubmit(ajax.options);
} }
else { else {
$.ajax(options); $.ajax(ajax.options);
} }
} }
catch (e) { catch (e) {
alert("An error occurred while attempting to process " + options.url + ": " + e.message); alert("An error occurred while attempting to process " + ajax.options.url + ": " + e.message);
} }
return false; return false;