I'm using jquery with the jquery form plugin. I read through a bunch of posts, the docs, etc., and I'm still having trouble with what I believe to be simple. I have a form with some simple text inputs and a couple textareas, and I have this link that I want to trigger submission of that form to a specific method (/email):
<a id="email-data">Send Email</a>
and this jquery in doc ready:
$('#email-data').click(function() {
var options = {
url: '/email/',
success: alert('Email sent.')
};
$('#report-giftcard-sales-form').ajaxSubmit(options);
});
So I would expect it to submit to my /email method, but no such luck. Currently I just have the /email method logging a debug message, so it's as simple as can be.
Any help is greatly appreciated.