Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Problem in implementing ajax

    hi.
    Two ajax and php files are located in a domain. and, ajax is calling in another domain.
    Why get a response from php is empty? While not empty.
    Like the image attached.

    thanks for your answer.
    Attached Thumbnails Attached Thumbnails Problem in implementing ajax-ajax-response.jpg  

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    We'd be able to help you much better if you posted the code you're using.

    I'm guessing you're coming up against the same-origin policy.

    You can either get the AJAX target page to spit out JSON wrapped in a callback function (JSONP) or you can simply fire your cross-domain requests at a proxy PHP script on your own server; the script fetches the target content and returns it to your AJAX call.

    HTH.

  • #3
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    replay

    I realized that xhr.readystate = 4 and xhr.status = 0. What does this mean?
    Last edited by mor_mah; 07-06-2010 at 02:30 PM.

  • #4
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    Quote Originally Posted by mor_mah View Post
    I realized that xhr.readystate = 4 and xhr.status = 0. What does this mean?
    Are you using raw Ajax here? If so I think you may get better help if you have your post moved to the Ajax subforum. This is the Javascript Frameworks forum.


  •  

    Posting Permissions

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