ajaxUrl is not defined
ajaxUrl is not defined
当我按下绿色按钮时http://jazzkredit.ru/在提交表单后,我收到了消息"ajaxUrl未定义",而不是应该弹出的图像和我应该在电子邮件中收到的电子邮件。
有人能帮我解决这个问题吗?我试着在谷歌和Stackoverflow上搜索答案,但没有帮助。
var formData = new FormData($('form#loanappform')[0]);
$.ajax({
url: ajaxUrl, //Server script to process data
type: 'POST',
xhr: function() { // Custom XMLHttpRequest
var myXhr = $.ajaxSettings.xhr();
if(myXhr.upload){ // Check if upload property exists
myXhr.upload.addEventListener('progress',progressHandlingFunction, false); // For handling the progress of the upload
}
return myXhr;
},
//Ajax events
success: completeHandler,
// Form data
data: formData,
//Options to tell jQuery not to process data or worry about content-type.
cache: false,
contentType: false,
processData: false
});
您需要首先定义ajaxUrl,或者只使用发布到的服务器端文件的直接名称:方法A:var ajaxUrl = "process-ajax.php"
方法B:url: "process-ajax.php"
相关文章:
- reactRedux is not defined
- ReferenceError: not defined
- ReferenceError: cordova is not defined @ng-cordova.min.js:7
- jQuery is not defined - WordPress footer.php
- GAPI Is Not Defined
- Page_ClientValidate is not defined
- ReferenceError: $firebase is not defined
- ReferenceError: crimeID is not defined
- AngularJS: $scope is not defined?
- ajaxUrl is not defined
- WebView: Uncaught ReferenceError: Android is not defined
- ReferenceError SetInterval not defined
- ReferenceError: yes is not defined
- ReferenceError "not defined"
- Soundcloud API ReferenceError: $ is not defined (JavaScript)
- Angular: Compile is not defined
- nodeJS phantom ReferenceError: Promise is not defined
- observableArray is not defined
- Uncaught ReferenceError trapArea/Per is not defined
- ReferenceError: xmlhttp is not defined