Using the submit function from jquery, how can I get it to post to a uri other than the current page?
For example, I would like the post to go to /comments as opposed to /user/blog. I’ve looked at the jQuery API page for submit but I don’t see something about posting to a different page. Here’s the start of the javascript:
jQuery(function() {
return $('.comment_input').find('form').submit(function(e) {
});
});
The best way would be to set the action on the form so it doesn’t post to the same page:
You can also set it with jQuery on page load: