I want to achieve the same as...
window.open('lalala.php', 'lalala', '...');
But I want to send a HTTP POST request instead of a HTTP GET request. Thus, I'm using the following:
$('<form/>').attr('action', 'lalala.php')
.attr('target', 'lalala') // w3schools.org says this is deprecated
.attr('method', 'post')
.append(hiddenParam('param1', param1))
.append(hiddenParam('param2', param2))
.submit().remove();
// hiddenParam is a function I created that returns an input tag
// the type attribute set to hidden,
// the id attribute set to the first parameter,
// and the value attribute set to the second parameter
However, the target
attribute is deprecated. Is there any way to achieve what I'm trying to do by non-deprecated means?