$('#auth').ajaxForm({
dataType: 'json',
success: function(data)
{
$.each(data, function(i, val)
{
if(i == 'e')
{
bootbox.dialog('
Ошибка
'+val,
[{
"label" : "Продолжить",
}]
);
document.getElementById("captcha_img").src = home+'auth/captcha?'+Math.random();
$('#captcha').val('');
}
if(i == 'i')
{
bootbox.dialog('Внимание
'+val,
[{
"label" : "Продолжить",
}]
);
$('#security_code').css('display', 'table-row');
document.getElementById("captcha_img").src = home+'auth/captcha?'+Math.random();
$('#captcha').val('');
}
if(i == 's')
location.reload();
});
}
});