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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T02:16:24+00:00 2026-06-03T02:16:24+00:00

I have some ajax calls in document ready to populate a table. Unfortunately the

  • 0

I have some ajax calls in document ready to populate a table. Unfortunately the page is only being displayed once the table has been populated.

$(document).ready(function() {
    // alert('Why');
    var jsondata2a;
    turl = "/rims/tab1/get_data?abc=123";
    $.ajax({
    url: turl+"",
    cache: false,
    async: false,
    success: function(data){
            jsondata2a = data;
    },
    error: function(){
            $("#gerror").html("<p>An error has occurred!</p>");
        }
    });

However, if I put an alert statement in the ready function, the page displays immediately with the alert and then populates the table after accepting the alert.

The full page displays on the alert statement, but the page does not display until all the ajax calls have been completed if the alert is not there. I have tried to move the ready function to different parts of the page without success. I have tried with IE and Chrome.

Any help appreciated.

Thanks

  • 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-06-03T02:16:26+00:00Added an answer on June 3, 2026 at 2:16 am

    This should work. I’m sure you have other prt of scipt which know how to draw that table. just add that code in success callback

    $(document).ready(function() {
        // alert('Why');
        var jsondata2a;
        turl = "/rims/tab1/get_data?abc=123";
        $.ajax({
        url: turl+"",
        cache: false,
        // async: false,
        success: function(data){
                jsondata2a = data;
                for(var i=0; i< data.length; i++){
                   $("#table_id").append("<tr>" ...boud data here data[i].someAttribute... "</tr>");
                }
        },
        error: function(){
                $("#gerror").html("<p>An error has occurred!</p>");
            }
        });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a page which issues several ajax queries in $('document').ready() . I want
I have some content that I am loading using jquery ajax. The content has
I have some jQuery code that runs on every $(document).ready() event. I also have
Let's say, for example, that I have some buttons that calls AJAX requests when
I have the below jQuery code: $(document).ready(function () { $('#ajaxButton').click(function () { $.ajax({ url:
I have a website where an ajax call will get some Json data from
If I have an ajax call off fetching (with a callback) and then some
I have written some jQuery ajax code where I am sending a request to
I have already implemented some AJAX pagination in my Rails app by using the
I occasionally have some long running AJAX requests in my Wicket application. When this

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.