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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:53:07+00:00 2026-05-15T04:53:07+00:00

In my web application I call a document can be huge. This document is

  • 0

In my web application I call a document can be huge. This document is loaded into an iframe.

I have a title, buttons and the text which all depends on this document. The text is from the large document and is displayed in the iframe. I’d like to show an animated gif while the document is loading on 3 places (1: document title, 2: document buttons, 3: document text, the iframe)

I’ve tried the onload event on the Iframe, but this doesn’t give the me the desired effect.

Here’s my code that loads the document:

function loadDocument(id, doc) {
    $("#DocumentContent").show();
    $("#ButtonBox").show();

    // Clear dynamic menu items
    $("#DynamicMenuContent").html("");
    $("#PageContent").html("");

    // Load document in frame
    $("#iframeDocument").attr("src", 'ViewDoc.aspx?id=' + id + '&doc=' + doc + '');    

    //    $("#iframeDocument").attr("src", "Graphics/loader.gif");    

    // Load menu items
    $.ajax({
        url: "ShowButtons.aspx?id=" + id + "&doc=" + doc,
        success: function(data) { $("#DynamicMenuContent").html(data) },
        error: function(xhr, err, e) { alert("error: " + err) }
    });    

    // Set document title
    $("#documentTitle").load("GetDocumentInfo.aspx?p=title");
}

My questions, how can I display a loader gif while the document is loaded? And remove the gif when the document is ready?

  • 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-15T04:53:08+00:00Added an answer on May 15, 2026 at 4:53 am

    I’ve created a div with an image and some text. In my function I make this div visible. I’ve also created a javascript function (closeLoading()) which hides this div. In the onload of the iframe I call closeLoading(). I’ve got my inspiration from this site: http://mf.pastebin.com/f3c863aa4

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's a web services I want to call in my application, I can use
Mending a bug in our SAP BW web application, I need to call two
I'm using Web Services Enhancements 3.0 to call a web-service from an ASP.NET application
Our web application sends e-mails. We have lots of users, and we get lots
My web application generates pdf files and either e-mails or faxes them to our
My web application has a login page that submits authentication credentials via an AJAX
My web application sends email fairly often, and it sends 3 kinds of emails:
Our web application renders fast in some IE browsers, slow in others... It seems
My web application (MonoRail, Windsor, ActiveRecord) has a Startable import service and one or
My web application worked very well in a Windows Server 2003 with .NET Framework

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.