[jQuery] Help Modifying the Action Page of an AJaX Form
I have a form on a page that doesn't have a submit button, per se.
Instead, there are a number of elements which, when clicked, should
submit the form to an action page that is specific to the element that
was clicked. I see that I can ajax-ify a form, but I don't see how to
modify the action attribute at the time the form is submitted.
Currently, I have this working fine, but I need to implement a form
for user input while maintaining the dynamic action page and the ajax
nature.
$('img[@src$=/run.png]').click (
function ( e ) {
var report = this.id.replace ( /\w+-(\w+)/, '$1' );
$.getJSON (
'/reports/' + report + '.php',
function ( result ) {
displayResult ( report, result );
}
);
}
);
Any help?
Thanks.
/rob