passing data on two domains using Ajax
This is a client Request,
Client has two domains www.file.domain1.com and www.cfile.domain2.com, in Different servers both contains the info about the patients information files, which shows in tree structure.
Our client request is "Move files from one domain to another in DRAG & DROP method" because it is easy for him to access :(
What we suggest is Viewing both file structure in iframes and shall use jquery or Dojo framework for DRAG & DROP. Drag the file from one iframe and put it another iframe (i.e) both iframes are different domains, and开发者_如何转开发 destination iframe want to be updated
Is that possible OR Any other views...
You could probably accomplish this using jQuery UI and the built-in PHP FTP functionality. When you catch the drag and drop event on the destination iFrame, fire off an AJAX request to the server with the filename of the file that should be FTP'd to the other server.
I would use a server/client approach, where you are actually only dealing with one domain, but let the PHP get a listing from each website.
If the domains are on the same server, then this should be fairly straight forward, otherwise you would have to setup a slightly more complicated client/server architecture, that could allow the server to retrieve a file listing, download/upload and make any other necessary changes. (Could be via FTP as TaylorOtwell mentioned, give the server ftp access to the other domain's server).
Then using whatever javascript framework you choose and ajax requests you can send commands to the server which deals with everything behind the scenes.
I'd be wary of trying to do cross domain ajax requests with iframes, although you may get it to work somehow, its the kind of thing browsers don't want to allow to happen. So you could run into issues getting it working on all browsers.
精彩评论