I have a problem. I have following code in anonymous function:
...
if (fillActyalizerForm(jQuery(this).attr('account_id'), jQuery(this).attr('currency_id')) == false) {
return false;
}
jQuery("#actyalizer").slideToggle("slow");
...
THe problem is even if I return false, element slides down.
function fillActyalizerForm(account_id, currency_id) {
formValues = {};
jQuery.ajax({
async: false,
type: 'POST',
url: "..",
data: "{'accountId':" + account_id + ",'currencyId':" + currency_id + "}",
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (data) {
if (data && data.hasOwnProperty("d")) {
data = data.d;
}
if (!data.Error) {
formValues = data;
delete formValues.Error;
} else {
alert('<%=Resources.app.Actyalizer_AcLoadFail %>');
return false;
}
},
error: function (data) {
alert('<%=Resources.app.Actyalizer_AcLoadFail %>');
return false;
}
});
So I am successfully get alert message, but it still slides down the elemtn.
fillActyalizerFormfunction in your console.