On Jan 7, 7:48 pm, Frank Peterson <fictionalper...@gmail.com> wrote:
> Well the xml file is not on my server, but I'll try to shoot them an
> email and let them know, they should set the headers.

Are you sure that you're not running into cross-site scripting issues?

Security restrictions will prohibit you from AJAXing content from
other servers.

One solution is to create a local proxy on your server to pass through
the calls.

For example, this page will error out:

    http://scott.sauyet.com/Javascript/Demo/2010-01-08a/

But this one will work:

    http://scott.sauyet.com/Javascript/Demo/2010-01-08b/

The only difference is in the URL that's called:

    url: "http://ipinfodb.com/ip_query.php?ip="; + $("#ip").val()
    url: "proxy.php?url=http://ipinfodb.com/ip_query.php?ip="; + $
("#ip").val()

If you're using PHP, feel free to steal the PHP code (which is quite
possibly horrible; I don't know PHP that well):

    http://scott.sauyet.com/Javascript/Demo/2010/01/08b/proxy.phps

This is a very limited proxy, proxying only these requests.

  -- Scott

Reply via email to