pass post data with window.location.href

javascript, jquery

Solution

Using `window.location.href` it's not possible to send a POST request.

What you have to do is to set up a `form` tag with data fields in it, set the `action` attribute of the form to the URL and the `method` attribute to POST, then call the `submit` method on the `form` tag.

Problem

When using window.location.href, I'd like to pass POST data to the new page I'm opening. is this possible using JavaScript and jQuery?

Original source

Related problems