Contact Form
Posted: 18 Apr 2012, 06:01
I made all necessary adjustments for contact form (smtp, login and etc). Form is working, but if mail sent it was not return to contact form and show word “true” and left narrow.
I saw contactform.html and think may be some problem with included javacode:
I saw contactform.html and think may be some problem with included javacode:
Code
//<![CDATA[
(function ($) {
$(document).ready(function () {
$('#contactForm').submit(function (event) {
$.ajax({
url: '?a=contact',
type: 'POST',
data: $('#contactForm').serialize(),
complete: function (xhr, status) {
var resp = xhr.responseText.substr('success='.length);
if ('true' == resp) {
$('#contactFormResponse').html('<div>Your message succesfully sent!</div>');
$('#contactForm')[0].reset();
} else {
resp = resp[0].toUpperCase() + resp.substr(1);
$('#contactFormResponse').html('<div class="error">' + resp + '</div>');
}
}
});
return false;
});
});
})(jQuery);
//]]>
</script>