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 6854661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:39:41+00:00 2026-05-27T01:39:41+00:00

I have an ajax call in my document ready function. But in about 1

  • 0

I have an ajax call in my document ready function. But in about 1 out of 10 times in ie7, the ajax function doesnt get called at all.

Is there a way to check if the ajax call has been made, otherwise run it again until it either runs in to the error or success functions? The problem only occurs when i run the page in ietester -> ie7 mode. Thanks

code: http://jsfiddle.net/jxEj5/

  • 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-27T01:39:41+00:00Added an answer on May 27, 2026 at 1:39 am

    You could setup a variable as a monitor, and a timer to issue an ajax call every 5 seconds until the ajaxCall is finished.
    The monitor is set through var gotAjax = false and when the Ajax is succeeded, it is set to true gotAjax = true.

    Instead of call the $ajax directly, you set a time clock through setTimeout(ajaxCall, 5000). With in the timer, if the ajaxCall is set, you clear the timer through clearTimeout(ajaxCall)

    $(function() {
        var gotAjax = false;
    
        var ajaxCall = function () {
          if (!gotAjax) {
            $.ajax({
                url: '../SentinelOperationsUI/GenericHandler.ashx',
                dataType: 'json',
                data: {
                    'FunctionName': 'GetActivity',
                    'SearchType': 'Single',
                    'postedData': JSON.stringify($('#content').data('postedData'))
                },
                success: function(data) {
                    gotAjax = true;
                    $('#content').data('activityKey', data.SENTINEL_OPERATION_ACTIVITY_KEY);
    
                    $.ajax({
                        url: '../SentinelOperationsUI/ajax/activityviews/' + data.ACTIVITY_VIEW,
                        dataType: 'html',
                        success: function(data) {
    
                            $('#content').hide().html(data).fadeIn(200);
                            $('#parenttabs, #tabs, #tabs2, #parenttab-1, #parenttab-2').tabs();
                        }
                    });
    
    
                }
            });
          }
          else {
            clearTimeout(ajaxCall);
          }
        };
    
        setTimeout(ajaxCall, 5000);
    
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

in my profile/index.html.haml, I have :javascript $(document).ready(function(){ $('#clickablething').click(function() { $.get('/profile', {**passed in json data**},
I have a jQuery AJAX call with type:'GET' like this: $.ajax({type:'GET',url:'/createUser',data:userId=12345&userName=test, success:function(data){ alert('successful'); }
The problem is the following. We have lots of ajax call via $.ajax function.
I have ajax code for asp.net (non-mvc) to call to a webMethod to get
I have an AJAX call to load a function once the page is loaded,
Let's say we have like 3 functions: // Notice there are no $(document).ready function
Hi all I have a (probably) simple problem but I just can't figure out
i have an ajax call $.ajax({ url: '<%=Url.Action(SaveDetails,Survey) %>', dataType: 'JSON', cache: false, data:
If I have an ajax call off fetching (with a callback) and then some
I am running ASP.NET MVC Beta. I have an AJAX call running through jQuery

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.