Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4567488
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:56:16+00:00 2026-05-21T18:56:16+00:00

$.ajax seems to not work in IE. What should I do or it’s just

  • 0

$.ajax seems to not work in IE. What should I do or it’s just another bug in IE? Do I need to provide my code here to receive help? Because it seems it doesn’t work with any $.ajax example.

My code:

function get_info(lines) {
    $.ajax({
        type: "POST",
        cache: false,
        url:  "chat.php?RandomNumber=" + Math.random(),
        data: "type=get_info&lines="+lines+"&RandomNumber=" + Math.random(),
        dataType: "json",
        success: function(msg){
          lines = msg.lines;

          if(msg.new_messages)
          {
            for(i = 0; i < msg.messages.length; i++)
            {
                $('.chat').append("<p>"+msg.messages[i]+"</p>");      
            }
            document.getElementById('chatty').scrollTop = document.getElementById('chatty').scrollHeight;
          }
        },
        complete: function() {
            setTimeout(get_info, 1000, lines); 
        }
    })    

};    

setTimeout(get_info, 1000, 0); 
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T18:56:16+00:00Added an answer on May 21, 2026 at 6:56 pm

    I now see that you’re using a form of setTimeout that doesn’t work with IE1, 2:

    setTimeout(myFunction,myTimeout,parameter); //does NOT work for IE
    

    Instead, use an anonymous function as the argument which should call the intended function with the correct argument:

    setTimeout(function(){myFunction(myParameter);},myTimeout);
    

    So your initial call to setTimeout should be changed to:

    setTimeout(function(){get_info(0);}, 1000); 
    

    and subsequent calls on success should be:

    setTimeout(function(){get_info(lines);}, 1000); 
    

    If this is because IE is caching your GET requests, you could simply set cache to false for jQuery.ajax() and let jQuery handle it for you (remember to clear your cache after making this change):

    //do this for *all* ajax requests
    $.ajaxSetup ({
        cache: false
    });
    

    or

    //do it for this ajax request
    $.ajax ({
        cache: false,
        //..other options here
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ajax seems to give a better user experience, but I'm not so sure if
This question seems to suggest that Ajax requests are not guaranteed to return in
I've not used much Ajax before, and this seems simple. I have the seperate
It seems that i cannot access $(this) inside jquery ajax success function. please see
The problem seems very strange. I have a AJAX helper function within a same
I want to send a Javascript array to PHP using AJAX. This seems very
I have this AJAX code, but it doesn't seem to throw the 'alert' method.
the solution here: Jeditable CANCEL callback from AJAX callback? using onreset() doesnt seem to
How should I implement reverse AJAX when building a chat application in Django? I've
I am trying to submit a form using jQuery's .ajax() function. It seems like

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.