Looping synchronous Ajax xmlhttp requests not refreshing in IE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • tetrahedral
    New Member
    • Jul 2010
    • 7

    #16
    Well then it appears cacheing can be ruled out as a probable cause.

    I noticed you're using window.onload. Are you sure that the div 'barber_pole' has been loaded when it tries to access it? If not, then it will just load in with the pre-loop content (as you said is happening). You might look into jQuery's .ready() function, which waits until all of the elements are ready before calling a function.

    P.S. Switching to jQuery in my development for this stuff saved me a load of headaches in terms of cross-browser problems.

    Comment

    • Chris G
      New Member
      • Jul 2010
      • 11

      #17
      .ready

      tetrahedral,

      I've tried experimenting with the .ready function but I'm not certain as to where it would be used...

      Is it wrapped around where the ajax object is created and where the send occurs?

      Thanks...

      Comment

      • tetrahedral
        New Member
        • Jul 2010
        • 7

        #18
        Originally posted by Chris G
        tetrahedral,

        I've tried experimenting with the .ready function but I'm not certain as to where it would be used...

        Is it wrapped around where the ajax object is created and where the send occurs?

        Thanks...
        It's much less complicated than you think!

        In place of:
        Code:
        window.onload=order_process;
        Use:
        Code:
        $(document).ready(order_process);
        //Which is also the same as
        $(order_process);

        Comment

        • Chris G
          New Member
          • Jul 2010
          • 11

          #19
          No luck...

          Thanks again, Tetrahedral.

          I replaced the onload with the following...

          Code:
          $(document).ready(order_process);
          And the results were the same as with the onload.

          Eek...

          Still pulling my hair out...

          Comment

          • tetrahedral
            New Member
            • Jul 2010
            • 7

            #20
            Do you have a javascript debugger installed?

            Comment

            • johnb773
              New Member
              • Sep 2010
              • 4

              #21
              Same problem

              I am also having the same problem. If I clear Temp Internet files, and reload, it will display the correct file. Every refresh/loop after that, only shows the initially loaded file. Even if I close the browser and reopen it, it still shows the 'cached' version.

              I've added an "alert(xmlhttp. responseText);" and that too only shows the 'cached' version. It seems that IE looks for a cached version first, which is strange since in the .js file it starts a "NEW" request and I'm just having it "GET" a .txt file. Which would make me think that even if you add "no-cache" to your HTML/PHP file, the "no-cache" does not pertain to the XML get command. So, is there a way to do a FORCE get command?

              I've been working on this for about 4 days now, and still no progress. Has anyone found a solution for this yet?

              --John
              Last edited by johnb773; Sep 25 '10, 03:50 AM. Reason: adding more info

              Comment

              • gits
                Recognized Expert Moderator Expert
                • May 2007
                • 5388

                #22
                try to add a unique querystring to the url before sending the request, like:

                Code:
                xmlhttprequest.open("GET", url + "?" + (+ new Date), false);
                Last edited by gits; Sep 25 '10, 10:07 PM.

                Comment

                • johnb773
                  New Member
                  • Sep 2010
                  • 4

                  #23
                  gits-

                  Thank you. I figured that out this morning (1:30am), then went to bed -- bald!

                  Comment

                  Working...