Modify POST vars before post, using jQuery
Posted
by aidan
on Stack Overflow
See other posts from Stack Overflow
or by aidan
Published on 2010-04-15T18:11:43Z
Indexed on
2010/04/15
18:13 UTC
Read the original article
Hit count: 740
I have a form, and a submit handler in jQuery.
When the user submits the form, I want to modify (add) some parameters to the POST request, before it is despatched from the client to the server.
i.e.
- User clicks 'submit'
- My jQuery submit hander begins execution...
- I create some new key/value pairs and add them to the POST payload
At the moment, it looks like my only options are to use $.post(), or $('form').append('
Thanks for any help.
© Stack Overflow or respective owner