'Unexpected end of input in Ajax function
I have this function:
<script>
function jQueryAjaxForm(form) {
$.validator.unobtrusive.parse(form);
if ($(form).valid()) {
var ajaxConfig = {
type: 'POST',
url: form.action,
data: new FormData(form),
success: null
}
if ($(form).attr('enctype') == "multipart/form-data") {
ajaxConfig["contentType"] = false;
ajaxConfig["processData"] = false;
}
$.ajax(ajaxConfig);
}
}
</script>
And I'm getting the error at the closing </script> tag.
I've checked all brackets and still have yet to figure out whats wrong with it. Any help would be appreciated
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
