is it possible to stop the submission of a form,after submit button has been clicked and get the action attribute and the request parameters of the submission using javascript(preferably jQuery) ? I want to get the action and the parameter so that the it can be submitted to an alternate location ,what i am tryin to do is try writing a proxy website.
+3
A:
Can't you just concatenate the form's action with a serialization of the form's data, e.g.:
$('form').submit(function() {
alert($(this).attr("action") + $(this).serialize());
return false;
});
karim79
2010-03-30 16:27:02
how can i get the post parameters ?
Bunny Rabbit
2010-03-31 11:54:30
@Bunny Rabbit - `serialize()` will serialize all of the form's elements the same way regardless of the form's method.
karim79
2010-03-31 12:00:28