Denermisiniz :
function commentPost(){
$.ajax({
type: "POST",
url: home + "/ajax.php",
data: $('form#commentForm').serialize(),
success: function(x) {
if(x == 0){
$.msgBox({ title: "Uyarı", content: 'Lütfen Formu Boş Bırakmayınız!', });
}elseif(x == 1){
$.msgBox({ title: "Uyarı", content: 'E-Posta Adresiniz Geçersiz!', });
}else{
$.msgBox({ title: "Uyarı", content: 'Başarılı!', });
setTimeout(function(){ window.location = url; }, 2000);
}
},
error: function(x) {
$.msgBox({ title: "Uyarı", content: 'Hata Oluştu!'});
}
});
}
Alttaki fazla olan tırnağı kaldırmışsın ama üsttekiler duruyor ayrıca "
elseif" yerine "
else if" yazılmalı.
function commentPost(){
$.ajax({
type: "POST",
url: home + "/ajax.php",
data: $('form#commentForm').serialize(),
success: function(x) {
if(x == 0) {
$.msgBox({ title: "Uyarı", content: 'Lütfen Formu Boş Bırakmayınız!'});
} else if(x == 1) {
$.msgBox({ title: "Uyarı", content: 'E-Posta Adresiniz Geçersiz!'});
} else {
$.msgBox({ title: "Uyarı", content: 'Başarılı!'});
setTimeout(function(){ window.location = url; }, 2000);
}
},
error: function(x) {
$.msgBox({ title: "Uyarı", content: 'Hata Oluştu!'});
}
});
}