View Single Post
Old 12-19-2012, 12:03 AM   PM User | #1
Cyrusis
New Coder

 
Join Date: Dec 2012
Posts: 21
Thanks: 5
Thanked 0 Times in 0 Posts
Cyrusis is an unknown quantity at this point
Need a little help with a jquery form success function.

Hi there!

I have an issue with the form I incorporated into my website. It sends the email to me in the end with the right information but there seems to be an issue when it's finished sending. It is supposed to close and submit a message saying Thank you but instead it drags down or just closes without saying anything. To clarify, the box animates and closes upwards without reloading the page and displays a Thank you, We will contact you soon ! in the grey bar that remains.


Here's the code in the html:
Code:
		<script>
		$(document).ready(function() {
			
			
			
			// SUCCESS AJAX CALL, replace "success: false," by:     success : function() { callSuccessFunction() }, 
			$("#form1").validationEngine({
				ajaxSubmit: true,
					ajaxSubmitFile: "ajaxSubmit.php",
					ajaxSubmitMessage: "Thank you, We will contact you soon !",
				success : function() { callSuccessFunction() },
				failure : function() {}
			})
			

		
		});
		</script>
I tried to do this, as per Old_Pedant's suggestion:
Code:
     success : function() { alert("email sent successfully"; },
     failure : function() { alert("unable to send email"; }
But it didn't work.

Please if someone could help me button this up, it would be fantastic and I'll be able to finish this little project of mine. Greatly appreciate it! If any more details are needed please let me know.

Last edited by Cyrusis; 12-19-2012 at 10:37 PM..
Cyrusis is offline   Reply With Quote