Reputation: 93
I have been trying to submit a form using ajax and formData. But it was not working in IE9.
Finally I found that IE9 does not support formData. Then I changed submitting the form using ajaxSubmit. But this also not working for file upload.
But I am getting an error in IE console that 'Type error' access denied.
Here is my code.
$("#link-categories-form").ajaxSubmit({
url: '<?php echo Yii::app()->createAbsoluteUrl("Categories/updatecategory"); ?>? id=' + id,
success: function (data) {
if (data == "success") {
alert('success');
}
else {
alert('error);
},
error: function (data) { // if error occured
alert("Error occured.please try again");
alert(data);
}
});
Upvotes: 1
Views: 1005
Reputation: 6007
Try this
$("#link-categories-form").ajaxSubmit({
url: '<?php echo Yii::app()->createAbsoluteUrl("Categories/updatecategory"); ?>?id=' + id,
success: function (data) {
if (data == "success") {
alert('success');
}
else {
alert('error');
}
},
error: function (data) { // if error occured
alert("Error occured.please try again");
alert(data);
}
});
Upvotes: 1