Ajax, inherently, cannot make a call to another domain. When we need to grab remote data from another domain, we have to turn to some kind of helper to get the data.
This example requires either PHP or ColdFusion to be installed on our development machine. The example shows a call to
05_remote_data.php. If we are using ColdFusion, please use the included snippet named
The recipe is a continuation of what we are working on in the previous, local data request recipe. When we are familiar with those concepts, adding the remote call will be an easy stepping stone.
Interestingly, the client-side portion of this only changes in the URL variable. ...