extracting the post parameters from a form using javascript/jQuery before submission

Posted by Bunny Rabbit on Stack Overflow See other posts from Stack Overflow or by Bunny Rabbit
Published on 2010-03-31T12:19:28Z Indexed on 2010/03/31 12:23 UTC
Read the original article Hit count: 183

Filed under:
|
|

how can i get the parameters of any form being submitted with method=post before it's submitted using javascript(preferably jQuery). What i am trying to do is get the post parameters and submit it to an alternate loacation. i was using

 $('form').submit(function(){
            alert('action=  '+$(this).attr("action"));
            alert('serialized string'+ $(this).serialize());
            return false;
        });

but it works only with get request i want to extract the parameters from the post requests too .

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about JavaScript