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 2 of 2
  1. #1
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,530
    Thanks
    45
    Thanked 259 Times in 256 Posts

    AJAX requests not working

    So I'm in a fix that I do not know how to fix.

    I have a number of $.post calls through my site to do fun and fancy AJAX stuff. I was testing my site today and showing off to some people, only to have one of them tell me that the code wasn't working. I found none of the AJAX requests I have on my site were working. I found the .error function to attach to the jqXHR object, and it gives me back the 'errorThrown' 'Not Found'. Apparently it can't find the same URL now that it could a few weeks ago. Unfortunately, I'm not sure what I changed that broke the code, and I'm not sure how to debug it. I've been trying various URLs and NOTHING is working. If AJAX isn't going to work, more or less my site is not only far less impressive, but a lot of the work I put into it has become meaningless.

    I'm hoping someone can help give me some ideas... I've put a lot into my site, and now I have a bug I can't even figure out how to fix it...

    You can see the broken version at http://gamersplane.com/tools/dice


    UPDATE:
    So I testing it locally as well as on my server, and it doesn't work in either location. However, locally, if I try a post request to 'http://localhost', I get back the localhost page. My site works off a dispatch system (all URL requests are directed to dispatch.php), and it seems any of .post requests to any of dispatched urls don't work, but only 3 of the 4 non-dispatched urls (I have a few URLs the .htaccess is designed to ignore for testing purpose) do work.

    So really, I'm just lost...


    UPDATE 2:
    I just realized firebug can trace the request, and it shows a 404 status, but also gives me a return, the correct return I'm expecting... how the hell does it not find the file but also gives back a response?
    Last edited by Keleth; 04-29-2012 at 06:39 AM.

  • #2
    Senior Coder
    Join Date
    Jun 2008
    Location
    New Jersey
    Posts
    2,530
    Thanks
    45
    Thanked 259 Times in 256 Posts
    Ok, I figured it out, and it isn't the jQuery (which isn't surprising). I have a Wordpress install on the site, and its integrated into the site... I call the wordpress header so people can be logged into wordpress by logging into the site... the header is also adding a pingback, which is failing to resolve for some reason... when I comment out the include for the wordpress header, it works... gotta figure out how to merge the two...


    Its adding an "X-Pingback" item to the header... can I remove that somehow?
    Last edited by Keleth; 04-29-2012 at 06:51 AM.


  •  

    Posting Permissions

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