SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    AJAX question/problem

    I use a variety of AJAX on a couple of projects and everything has been working well. Today we had some network issues and what I noticed is that while my AJAX request is being processed and waiting to here back from the server it almost appears like the browser is locked up. It's not locked because dropdown menus and such continue to work, but it won't actually let me go to another page or submit a form until the server responds and the callback function is finished.

    Is there anyway around that? Let me know if I need to clarify more.

  2. #2
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    What ajax framework are you using? It sounds like something wrong with the framework.

  3. #3
    SitePoint Member
    Join Date
    Sep 2006
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It's all homegrown. Works fine, it's this one little thing. I've been debugging most of the night. For testing I put a sleep(60); into my php script that my ajax page talks to. If I click on a link anytime while it's waiting for the response it actually continues and processes the callback function but it won't actually go to the link until my php script is done sleeping and returns it's results.

    There must be something stupid I'm not doing. It's like the browser is tied to the request being made and even when all of my javascript is done processing it won't continue on until the server has returned it's results.

  4. #4
    SitePoint Wizard cmuench's Avatar
    Join Date
    Jul 2005
    Location
    At my computer
    Posts
    2,251
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sorry I got no clue. I'm stumped.

  5. #5
    From Italy with love silver trophybronze trophy
    guido2004's Avatar
    Join Date
    Sep 2004
    Posts
    9,496
    Mentioned
    163 Post(s)
    Tagged
    4 Thread(s)
    I know it sounds stupid, but you did set the 3rd variable of the XMLHttpRequest.open call to true, didn't you?

    Code:
        request = new XMLHttpRequest();
        request.open('POST', strURL, true);


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
  •