ajax、php、jqueryを使用してデータベースにデータを挿入中にエラーが発生しましたが、ローカルホストで動作します。ajax、phpでデータベースにデータを挿入中にエラーが発生しました
$('#sunsubmit').click(function(){
var insertedvalue = $('#sundayform').serialize();
$('form#sundayform').unbind('sunsubmit');
$.ajax({
type: "POST",
url: "routineinsert/sunday.php",
data: insertedvalue,
beforeSend: function(messageinfo){},
success: function(messageinfo){
var c = customalertbox.render("Message!!",messageinfo);
progressdiv.style.display="none";},
error: function(jqxhr) {
customalertbox.render(jqxhr.responseText);
}
});
それは私のコンピュータが、しかしではなく、それも挿入コードが直接呼び出す誤差関数に配置され日曜日ファイルにリダイレクトされていないサーバーのためにのために正常に動作します。
あなたの問題を理解するためのコードを表示してください –
あなたのアプリのconfで問題が発生する可能性がありますig。 ( '#sundayform'); –
$( '#sunsubmit')をクリックします(function(){ var insertedvalue = $( '#sundayform');$アヤックス({ タイプ: "POST"、 URL: "routineinsert/sunday.php"、 データ:insertedvalue、 beforeSend:関数(messageinfo){}、 成功:関数(messageinfo){VARのC = customalertbox。 エラー:function(jqxhr){customalertbox.render(jqxhr.responseText);} }); –