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"; }