0

I know that many variations of questions have been asked on cross-domain issues (and it seems like I've read them all), but I can't get anything to work.

If I do this in my javascript code:

win = window.open(myHTMPage);

Is there a way to send data from "myHTMPage" in "level2.example.com" back to my calling javascript page in "example.com", when the user exits the page? I have control over both pages.

Setting document.domain causes problems in the rest of the application when it tries to access the rest of the aspx pages.

I don't think I can use postMessage across domains?

I can't seem to get any variation of HTTP POST to work, if that solution even makes sense.

I've been working on this forever, and really have no idea which is the correct direction to follow. If someone knows the answer, I'd be most grateful. Thanks in advance!

Ellen
  • 142
  • 1
  • 7
  • Look here:http://stackoverflow.com/questions/298745/how-do-i-send-a-cross-domain-post-request-via-javascript – Haloor Aug 04 '16 at 23:54
  • 1
    You can for sure use postMessage across domains. It specifically has a parameter for you to list the domains that are allowed to chat at you. This document might help out: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage. – Will Aug 05 '16 at 00:15
  • @Haloor, I'm not sure which solution you are recommending on this link. – Ellen Aug 05 '16 at 16:22
  • @Will, in theory it should work, but in reality, I don't seem to get anything back. – Ellen Aug 05 '16 at 16:43

0 Answers0