I'm trying to load a web-application in a new popup window, which sits on a different domain from my application, using a post request (It has to be post request!). Internet explorer is giving me an access denied message when trying to access the document object of the window. I tried other answers posted in similar SO threads, but didn't have any luck...
Note: I can't use ''
or 'about:blank'
for the url, because IE considers it to be insecure.
Here is what my code currently does
- Create window Object
- Generate form in JavaScript
- Attach form to body of window. // access denied!
Code:
var win = window.open(url, windowname, params);
var form = $(document.createElement('form'))
.attr('action', action)
.attr('method', 'post');
$(win.document.body).html(form.html()); // access denied!