$(document).ready(function(){ var options = { beforeSend: function(){ $(".loading").show(); $("#enq_msg").html(""); }, uploadProgress: function(event, position, total, percentComplete){ }, success: function(){ $('input:submit').attr("disabled", false); }, complete: function(response){ $(".loading").hide(); $("#enq_msg").show(); if(response.responseText == 'sent'){ $("#enq_msg").html("Thanx! Query submitted successfully."); $('#enq_subject').val(null); $('#enq_name').val(null); $('#enq_email').val(null); $('#enq_country').val(null); $('#enq_contact_no').val(null); $('#enq_query').val(null); $('#enq_sco').val(null); $("#enq_msg").fadeOut(9000); /*setTimeout(function(){ document.location=redi_url; }, 2000);*/ }else{ $("#enq_msg").html(""+response.responseText+""); $("#enq_msg").fadeOut(5000); } }, error: function(){ $("#enq_msg").html(" ERROR: unable to submit."); } }; $("#enqForm").ajaxForm(options); }); $(document).ready(function(){ var options_1 = { beforeSend: function(){ $(".loading1").show(); $("#feed_msg").html(""); }, uploadProgress: function(event, position, total, percentComplete){ }, success: function(){ $('input:submit').attr("disabled", false); }, complete: function(response){ $(".loading1").hide(); $("#feed_msg").show(); if(response.responseText == 'sent'){ $("#feed_msg").html("Thanx! Feedback submitted successfully."); $('#feed_subject').val(null); $('#feed_name').val(null); $('#feed_email').val(null); $('#feed_country').val(null); $('#feed_contact_no').val(null); $('#feed_feedback').val(null); $('#feed_sco').val(null); $("#feed_msg").fadeOut(9000); }else{ $("#feed_msg").html(""+response.responseText+""); $("#feed_msg").fadeOut(5000); } }, error: function(){ $("#feed_msg").html(" ERROR: unable to submit."); } }; $("#feedForm").ajaxForm(options_1); }); $(document).ready(function(){ var options_2 = { beforeSend: function(){ $(".loading2").show(); $("#comp_msg").html(""); }, uploadProgress: function(event, position, total, percentComplete){ }, success: function(){ $('input:submit').attr("disabled", false); }, complete: function(response){ $(".loading2").hide(); $("#comp_msg").show(); if(response.responseText == 'sent'){ $("#comp_msg").html("Thanx! Complaint submitted successfully."); $('#comp_subject').val(null); $('#comp_name').val(null); $('#comp_email').val(null); $('#comp_country').val(null); $('#comp_contact_no').val(null); $('#comp_query').val(null); $('#comp_sco').val(null); $("#comp_msg").fadeOut(9000); }else{ $("#comp_msg").html(""+response.responseText+""); $("#comp_msg").fadeOut(5000); } }, error: function(){ $("#comp_msg").html(" ERROR: unable to submit."); } }; $("#compForm").ajaxForm(options_2); });