views:

63

answers:

3

Here is my situation:

I have a Webserver machine, Client machine, and a third machine running some program that listens for XMLHttpRequests.

Client accesses the Webserver from the Client machine, makes some changes, and then clicks on'Save'. At this point, data is being sent back to the Webserver and to the Third machine. All of this is being done using Javascript and XMLHttpRequest object.

The post to the Webserver works fine, however post to the Third machine does not work, since it had a different IP/domain.

How can I make this work? Client machine -> Third machine does not work, because its on a different domain Webserver machine -> Third machine does not work, because of firewall issues

Any ideas are greatly appreciated!

+3  A: 
Ben S
+1  A: 

You could also use the iframe hack. An iframe hosted by the second domain can be rendered in a page hosted by the first domain, and the window object for the iframe will be accessible from the parent page's context.

Scott S. McCoy
This doesn't sound like a bad idea, I think that you can postMessage() between frames in this case too.
Erik Vold
A: 

Another option (which is admittedly a bit techie) is to use YQL if the data isn't sensitive. You can use YQL & JSON-P in order to fetch data from other domains as well.

Erik Vold