SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Ajax Question

  1. #1
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Ajax Question

    Just a quick question on ajax, I am working on a script and it works find but what i am trying to do is host the PHP files on my host and but the html/javascript on a different server but linking to the PHP files on my host, will this work or do i have to have all the files on one host?


    Andy

  2. #2
    Caveat surfer Buddy Bradley's Avatar
    Join Date
    May 2003
    Location
    Cambridge, UK
    Posts
    2,366
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can't do cross-domain requests with Ajax (well, there are workarounds/hacks, but it's not easy or recommended). You'd be better off writing the PHP as a web service that exposes an API you can use.

  3. #3
    SitePoint Enthusiast
    Join Date
    Jan 2006
    Location
    England
    Posts
    34
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ok thanks for your help

    Andy


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •