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

  • Home
  • SEARCH
  • 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 7994177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:03:57+00:00 2026-06-04T14:03:57+00:00

I am creating a functionality where a user presses a button (Print Timetable) and

  • 0

I am creating a functionality where a user presses a button (Print Timetable) and then a popup window appears with a page showing their timetable and then the printing options automatically appear. However, when the popup is still loading the timetable I want to display an animated GIF. The timetable in the popup isn’t fetched with AJAX so I can’t use ajax start and stop so how would I do this then?

<input type="button" value="Print Timetable" class="printButton" onclick="window.open(url, ' _parent','height=550, width=800');"/>

This is what is happening so far in the timetable popup:

<div id="animated-logo" class="animated-logo">
    <a href="/" title="Print your timetable">Test</a>
</div>

<script  type="text/javascript">
        $('.animated-logo').addClass('logo');
        $('.animated-logo').removeClass('animated-logo');
    if (window.print){ self.print();}

</script>

Obviously, that animated gif isn’t going to work but it’s a start.

Any help would be great. 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-04T14:03:58+00:00Added an answer on June 4, 2026 at 2:03 pm

    Have a look at jQuery’s load() over here.

    HTML

     <div id="" class="itm-animated-logo">
            <a href="/" title="Print your timetable">Test</a>
            <div id="time-table">...</div>
        </div>
    

    jQuery

    $("#time-table").load(function() {
      $(this).parent().removeClass("itm-animated-logo");
    }
    

    CSS

    .itm-animated-logo {background-image: loading.gif;}
    

    So when the pop-up is loaded (with class itm-animated-logo), its background will be the loading.gif file. As soon as your time table is loaded (#time-table) the class of the pop-up will be removed and the background, subsequently, as well.

    The downside of this may be that parts of the time table will get loaded (so the time table gets loaded in chunks) in which case they will be ‘on top of’ the background-image. To fix this you can make an extra div. Maybe this solution is even better:

    HTML

     <div id="" class="itm-animated-logo">
            <div id="loading"><img src="loading.gif" alt="Loading your time table" height="32" width="32" /></div>
            <a href="/" title="Print your timetable">Test</a>
            <div id="time-table">...</div>
        </div>
    

    jQuery

    $("#time-table").load(function() {
      $(this).parent().children("#loading").fadeOut("slow");
    }
    

    CSS

    #loading {
       display: block;
       width: 32px;
       height: 32px;
       margin: 50px auto;
       padding: 0;
    } 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating User messaging functionality from scratch, and am attempting to figure out
I am creating a web user control for showing Alert on AspxGridView Columns(Delete/Edit) click
I'm creating a website and part of the functionality is that a user can
I am creating a Rails app with the following functionality: A user can save
I need to have functionality that would essentially emulate user creating a port forwrding
I am creating a settings editor where plugin writers can define their own user
I am creating some tag functionality for a forum using linq2sql, and I have
I need to integrate the functionality of creating dynamic pages (like google sites) to
I am creating an ASP.NET MVC application that has postcode lookup functionality. I capture
I'm creating a C api that hides some functionality in a DLL file. Since

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.