jQuery contact form and the for, is submitting but the reply showing that it was sent is showing up on a bank white page not sure why, want it in the place were the form is any ideas to help with code?????
jQuery(function() { // Shorthand for jQuery(document).ready(function() {
//
if (jQuery('.comments-form,.contact-form').length > 0) {
Modernizr.load([{
load: ['js/jquery.form.js', 'js/jquery.validate.js'],
complete: function () {
jQuery('.comments-form,.contact-form').validate({
// Add requirements to each of the fields
rules: {
name: {
required: true,
minlength: 10
},
email: {
required: true,
email: true
},
message: {
required: true,
minlength: 20
}
},
// Specify what error messages to display
// when the user does something horrid
messages: {
name: {
required: kopa_variable.i18n.validate.name.REQUIRED,
minlength: jQuery.format(kopa_variable.i18n.validate.name.MINLENGTH)
},
email: {
required: kopa_variable.i18n.validate.email.REQUIRED,
email: kopa_variable.i18n.validate.email.EMAIL
},
message: {
required: kopa_variable.i18n.validate.message.REQUIRED,
minlength: jQuery.format(kopa_variable.i18n.validate.message.MINLENGTH)
}
},
// Use Ajax to send everything to processForm.php
submitHandler: function (form) {
jQuery(".comments-form .input-submit,.contact-form .input-submit").attr("value", kopa_variable.i18n.validate.form.SENDING);
jQuery(form).ajaxSubmit({
success: function (responseText, statusText, xhr, $form) {
jQuery("#response").html(responseText).hide().slideDown("fast");
jQuery(".comments-form .input-submit,.contact-form .input-submit").attr("value", kopa_variable.i18n.validate.form.SUBMIT);
}
});
return false;
}
});
}
}]);
}
})