When we do a window.open(), is there an option to specify method = POST? Since by default, it is GET?
What I want is this. The parent window has some form parameters (many in number) and they should be sent to the server on window.open(). It is not a good idea to append all of them in the GET url using query string.
You could use
window.open()to open an empty window, with a name. Then you could use a<form>with a “target” attribute referring to that new window’s name, and post it.edit OK here’s the idea. You have a form on the page, and it can be hidden:
Then you get the results into your window like this:
Make sure that the window name you use is a valid identifier (like a JavaScript variable name), or IE will get upset.
Here is a jsfiddle.