이미 여러 번 게시 된 질문을 게시하여 죄송합니다. 하지만 내 특정 문제에 대한 답을 찾을 수 없습니다. jQuery ajax() 메소드를 통해 제출되는 양식이 있습니다. Firefox와 Safari에서 완벽하게 작동합니다. 그러나 Internet Explorer 7에서는 성공 함수가 실행되고 있지 않습니다. 내가 솔루션이 거짓ajax success 함수가 ie7에 호출되지 않았습니다.
에 캐시를 설정 한 게시물을 발견했습니다 문제가 콤마했다이 질문에, 와/* FORM SCRIPT */
$('#creactform').submit(submitForm);
$('a.vrzknoplink').click(function(){
alert('stap 1');
var contactForm = $('#creactform');
// Submit the form to the PHP script via Ajax
$('ul#vrzknop').fadeOut(function() {
$('p#wachttext').fadeIn();
});
// Actually send the form info to PHP script
$.ajax({
url: contactForm.attr('action') + "?ajax=true",
type: contactForm.attr('method'),
dataType: 'json',
data: contactForm.serialize(),
success: submitFinished
});
// Handle the Ajax response
function submitFinished(response) {
alert(response.Result);
if (response.Result == "OK") {
$('div#formdiv').fadeOut("fast",function() {
$('div#successmessage').show();
$('p#wachttext').fadeOut();
});
$('.formfields').val("");
$('.inputtextarea').val("");
$('div#successmessage').delay(6000).fadeOut("fast",function() {
$('div#formdiv').show();
$('ul#vrzknop').show();
});
}
else if (response.Result == "ERROR" && response.ErrorCode == "missing_fields") {
alert("De velden met een * zijn verplicht om de aanvraag te versturen.");
$('ul#vrzknop').show();
}
};
return false;
});
function submitForm() {
return false;
};
내가 찾은 게시물 :
내 자바 스크립트 코드는 다음과 같습니다
그건 나를 위해 작동하지 않았다. 어떤 도움을 많이 주시면 감사하겠습니다!
캐시를 false로 설정해 보셨습니까? '$ .ajaxSetup ({cache : false}); ' –
네, 해보았습니다. 일하지 않았어. 나는 그것을 대본의 적당한 장소에 넣었습니까? 나는 $ .ajax 함수 바로 앞에 놓았다. – Ellifino