Window.Open() method not working in IE8

Hi all,

I have a requirement to generate a dynamic HTML which will show popup having certain fields like logged in username and some other values which i can find in the client side. I’ve written javascripts for all the stuff and methods are working fine.

Now, the problem is showing them in a pop-up with a close button. I developed a method constructHTML and return a variable having constructed HTML based on return values of javascript functions.

Now, I opened a new window using window.open() and trying to write this html string variable to the new popup.

The approach is working fine in Mozilla but not in IE. It gives me the following error -

Webpage error details

[I]User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.2; Trident/4.0; .NET CLR 1.1.4322; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 2.0.50727; InfoPath.2)
Timestamp: Mon, 2 May 2011 10:48:52 UTC

Message: Access is denied.

Line: 57
Char: 2
Code: 0
URI: PortalPageInfoPopup.js[/I]

Here is the complete code snippet that I used:

[COLOR=“Red”]function invokePopUp() {

//Create the popup
var html = constructHTML(); //Return String HTML 
var prevDomain = document.domain;

var popup = window.open('PortalPageInfoPopup.html',"_blank","resizeable,width=800,height=600");
popup.document.domain = prevDomain;
popup.document.write(html);
	
if(!window.focus()){
	//alert("IN FOCUS");
	popup.focus();
	
	}

}[/COLOR]

You cannot set a domain.

So, any idea how we can write that HTML string to Pop-up? I embedded that domain related code snippet assuming that cross-domain scripting is issue. Any code snippet will help me a lot.

Thanks in advance.