[jQuery] jQuery Success on form submit not working?
Hi all - I cannot seem to get this success piece to work, the script will go through and validate each field of my contact form and prompt the user to enter in required data etc... Hit the submit button and I get my email notification however; the success function does not display. Anyone know why? Js.setup.util.editable({title: Key in the custom value}); var contactBox = window.contactBox = { contact: { task: function() { var node = jQuery(#contact_type); var child = jQuery(#show-if-corporate); var task = function() { if (node.val() == Corporate) { child.slideDown(); } else { child.slideUp(); } }; node.bind(change, function() { task(); }); task(); }, success: function(text) { jQuery(#contact-form).slideUp(); jQuery(h3/).text(Thank You).appendTo(#col_670); jQuery(p/).text(I will get back to you shortly.).appendTo (#col_670); } } } jQuery(function() { new Js.util.editable(#contact_subject); new Js.util.editable(#contact_task); new Js.util.editable(#contact_type); new Js.util.editable(#contact_budget, { prefix: $ }); contactBox.contact.task(); new Js.util.formSubmit({ id: #contact-form, url: contact_me.php, option: { onError: function(){ alert(Please fill in all required fields (marked by *)); } } }); });
[jQuery] Contact Form Validation with Savvy and PHP
I cannot get this to work for the life of me. The validation works, if you a user fails to enter in a required field it alerts them to that. However; when a user submits a complete form it send it to my email properly but does not display the success text? Is it my PHP or jQuery that's wrong? Please help! Javascript w/ form: form id=contact-form p* Denotes a required field/p div class=container label* Your Name:/label input type=text name=contact_name class=required/ /div div class=container label* Your E-mail Address:/label input type=text name=contact_email class=email required/ /div div class=container labelSubject:/label select name=contact_subject id=contact_subject option value=Freelance JobFreelance Job/option option value=ContractContract/option option value=GeneralGeneral/ option /select /div div class=container labelNature Of Work:/label select name=contact_task id=contact_task option value=Web DesignWeb Design/option option value=Graphic DesignGraphic Design/option option value=Print DesignPrint Design/option /select /div div class=container labelType Of Work:/label select name=contact_type id=contact_type option value=PersonalPersonal/option option value=CorporateCorporate/Commercial/option option value=OtherOther/option /select /div div id=show-if-corporate div class=container labelWhat is your company name?/label input type=text name=corporate_company/ /div div class=container labelDo you need branding development?/label input type=text name=corporate_logo/ /div div class=container labelHow many pages will be designed?/label input type=text name=corporate_page/ /div div class=container labelDo you need a CMS?/label input type=text name=cms/ /div /div div class=container labelThis Work Is:/label select name=contact_remark id=contact_remark option value=NewA New Project/option option value=RedesignA Redesign/option /select /div