0

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");
}
9
  • Could you show your window.open call and the url of the page where you hosted it? Commented May 11, 2012 at 18:34
  • 1
    Fast check : you're opening the first file through an http connection, not using the open function of your browser ? Commented May 11, 2012 at 18:34
  • can you share your code's psudo. Commented May 11, 2012 at 18:37
  • Why do you precise the domain in your url ? Is that relative or not ? Commented May 11, 2012 at 18:40
  • 1
    If its the same domain, can you try a relative URL or absolute URL without the domain? Commented May 11, 2012 at 18:41

1 Answer 1

1

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");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.