blague Posted February 4, 2008 Share Posted February 4, 2008 Hi, is possible to make connection in two different domains and to change data between scripts in this domains with iframe and ajax request .Sorry to bad description for my problem.Please help me ! Link to comment Share on other sites More sharing options...
justsomeguy Posted February 4, 2008 Share Posted February 4, 2008 AJAX cannot send a request to a script on another domain, AJAX requests can only be to the same domain. PHP can communicate cross-domain though, so you could have one PHP page that you send your AJAX requests to that can check with the other script if necessary. Link to comment Share on other sites More sharing options...
jesh Posted February 4, 2008 Share Posted February 4, 2008 so you could have one PHP page that you send your AJAX requests to that can check with the other script if necessary.This Google search might help:http://www.google.com/search?q=ajax+proxy Link to comment Share on other sites More sharing options...
rnd me Posted February 5, 2008 Share Posted February 5, 2008 Hi, is possible to make connection in two different domains and to change data between scripts in this domains with iframe and ajax request .Sorry to bad description for my problem.Please help me !not with ajax. it can (kinda) be done with iframes using the location.search property to pass 2kb of data at a time.if you encode your data in JSON, or even a javascript-safe string, you read the data from anywhere by adding it from a script tag.let me elaborate:you can talk TO the iframe with GET parameters like <iframe scr="http://outsidedomain.com/thepage.htm?name=fred" ></iframe>on thepage.html, you can save data to a temp file (in json), and that data can be reached from the top page by pointing a script tag to the temp file.of course, if you don't control both pages, this will be virtually impossible to do.with two temp JSON files, you could also communicate two ways, but you will need write access on both servers, and the timing of when to add the script tags can become troublesome. Link to comment Share on other sites More sharing options...
Synook Posted February 5, 2008 Share Posted February 5, 2008 I think a PHP page with echo file_get_contents() is the easiest way. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.