PDA

View Full Version : xdomain data transfer



is_numeric
03 Dec 2009, 07:15 AM
Ok

I have 2 apps (APP1 and APP2)

APP1 is the parent app and APP2 is the child app and are run as a single entity via an iframe pulling in the child from the parent

APP1 is written in JSP

APP2 is PHP

Both are inside our internal network but reside on different boxes

How would you pass data between each app depending on selection choice in each?

[example]...


User loads parent and clicks a button which loads in the iframe and child app passing in initial data.
user then switches to iframe app completing job before closing.
child app passes back ref data to the parent app in order to close the job in the parent database.
process restarts.


I believe there are some security limitations on XMLHttpRequest across different domain/IP/boxes

dk01
06 Dec 2009, 08:52 AM
No browser is going to let you do that fortunately. I say fortunately because the browser has no way of knowing that site A and B have a two way relationship so as an internet user I am grateful of this protection.

Your only viable option is to do something on the server end. Maybe write out XML in the parent JSP app, then post that url to the PHP for parsing. Otherwise I know java can access HTTP protocol directly. You could probably write a little java that submits the data you need directly into the PHP server via a GET.

Sorry :(