1var form = document.createElement("form");
2form.setAttribute("method", "post");
3form.setAttribute("action", xxx);
4
5function submitToPopup(f) {
6 var w = window.open('', 'form-target', 'width=600, height=400, any-other-option, ...');
7 f.target = 'form-target';
8 f.submit();
9};
10
11document.body.appendChild(form);
12
13submitToPopup(form);
14