what's the easiest way to convert a GET URL string to POST in jQuery?
e.g. I want the params of a link
<a href="/somepage?x=1&y=3" id="postlink">link</a>
to be submitted as POST onclick if javascript is activated. No AJAX, just normal form submitting.
Any Ideas?
Thanks, Hannes.
demo : http://jsfiddle.net/w5WA6/
You can send form input using HTML <form method="POST">
While I'm not entirely sure of the rationale behind this, if you must enforce the javascript part, simply surround it the form with <form method="GET"> with a <noscript> tag.
I just write this code, check please, may be it helpful http://jsfiddle.net/AEwxt/
Modified Sergey's code a little, so that when the user 'hovers' on the link, it does not display the get request.
Link:
Converting to POST onclick: