Anonymous
Anonymous

Reputation: 1979

window.open cross scripting with same domain?

I have some javascript code that will pass data to a pop up for an intranet site. However, IE9 claims that it's cross scripting even though its the same domain. What's odd, is if I change the code from window.open to window.location, all is well. However, it's required to be a popup.

Also, the data that I am passing to the pop up contains html code.

I tried using javascript's escape and encodeURI, but have not had any luck.

Any help would be greatly appreciated.

EDIT: code 
JQuery.ajax({
...
...
...
success
{
 window.open("mydomain/mypage?data="+data,"Test","width=350,height=350");
}

Upvotes: 0

Views: 957

Answers (1)

Rab
Rab

Reputation: 35572

see on jsfiddle http://jsfiddle.net/DKehT/1/

you even dont need to encode. encoding is done automatically

var a="<htm>"
window.open("http://mydomain.com/mypage?data="+a,"Test1","width=350,height=350");

Upvotes: 1

Related Questions