Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 12-18-2012, 05:25 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
Hope this is a Javascript issue, need a little help with a form.

Hey everyone.

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.

Here is the website link with the issue: WEBSITE

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>

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.
Cyrusis is offline   Reply With Quote
Old 12-18-2012, 06:38 AM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,556
Thanks: 62
Thanked 4,055 Times in 4,024 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
Well, first of all it's jQuery, not vanilla JavaScript, so you might be better off asking in the jQuery forum.

Having said that: Ummm...I think you misunderstood the instructions.

You are supposed to *REPLACE* the callSuccessFunction() with a call to YOUR OWN FUNCTION that tells the browser user that the email send was successful!

I see no place in any of your files where you ever created such a function, certainly none with the name callSuccessFunction.

Just as a (REALLY BAD, but should work) example:

Code:
     success : function() { alert("email sent successfully"; },
     failure : function() { alert("unable to send email"; }
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
Cyrusis (12-19-2012)
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:34 PM.


Advertisement
Log in to turn off these ads.