javascript - Unable to explicitly set domain for document in Internet Explorer
Get the solution ↓↓↓Currently I have the document.domain to bewww.xyz.com
and I wanted to change it towww.abc.com
for which I wrote the below code.
document.domain = new_domain // where new_domain="www.abc.com"
Works for all the browsers except IE, where it shows invalid argument error for the above statement
I even tried to use .postMessage but no success.
This seems to be kinda stopper for me to load my iframe which I have already created in the DOM with height and width as 0. And use the below code to set the src
CI_jQuery('#print-frame').attr('srcdoc', data);
CI_jQuery('#print-frame').attr('sandbox', 'allow-same-origin allow-scripts allow-popups allow-modals allow-forms allow-downloads');
where data is the complete html content for the iframe and CI_jQuery = jQuery
Share solution ↓
Additional Information:
Link To Answer People are also looking for solutions of the problem: fastcgi sent in stderr: "primary script unknown" while reading response header from upstream
Didn't find the answer?
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Similar questions
Find the answer in similar questions on our website.
Write quick answer
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.