1

Is it possible to use the $.getJSON from a google Hangout Window. I am trying to do it from a barely modified sample version but I can't get any response from the server. http://pastebin.com/x8jXVceQ#

1 Answer 1

1

According to the Same origin policy you can just access a document via AJAX, if it is accessed through the same protocol and TCP port and is stored on the same domain.

If want to access a document from another domain, you can use Cross-origin resource sharing. Therefore the site you want to get via AJAX has to provide the Access-Control-Allow-Origin HTTP header like:

Access-Control-Allow-Origin: http://hangout.google.com 

(You have to replace hangout.google.com with the actual domain of the Google hangout window)

Sign up to request clarification or add additional context in comments.

1 Comment

I finally did it! I did not have to use jsonp but had to add the "Access-Control-Allow-Origin" to the response header. Thank you very much for your help tampis.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.