myClickHandler = function(e) {
var ng = $('#num_groups').val();
for (var group = 1; group <= ng; group++) {
if (!validation(group)) return false;
}
if (confirm( "Are you sure you want to Proceed?" + "\n")) {
$.ajax({
url: "insertpenaltymarks.php",
data: $("#PenaltyMarks").serialize(),
async: false,
type: "POST"
success:function(result){
$.ajax({
url: "sessioncomplete.php",
async: false,
type: "POST",
success:function(response){
window.location = "complete.php";
}
});
}
});
return true;
} else {
return false;
}
}
使用上面的代码,我试图发送 2 个 ajax 请求,一个去页面,insertpenaltymarks.php
另一个去页面。但我收到一个我不太明白的错误:sessioncomplete.php
complete.php
Syntax error at line 57 while loading: expected '}', got 'success'
success:function(res
这个错误实际上是什么意思,如何解决?