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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T05:11:25+00:00 2026-06-10T05:11:25+00:00

I display a loading spinner to reload a custom pdf reader (in html 5)

  • 0

I display a loading spinner to reload a custom pdf reader (in html 5) after each rotation of the device. It works well on an android device and when i simulate a rotation on desktop device, but on the iPad, I cannot see the spinner, it’s as if the actions showing the spinner / reloading the pdf reader/ hiding the spinner are executed at a “one shot”.
I’ve tried to delay the pdf reloading until the spinner is shown but it’s the same thing.
Here is the sequence of actions :

window.onorientationchange = function() {
           launchSpinnerThenRotate();
}

function launchSpinnerThenRotate(){
    alert(" i'll launchSpinnerThenRotate");
    showSpinner();
    setTimeout(rotatePdfReader(),1000);
}

I’ve tried both js and jquery functions to show / hide spinner always with the same effect

function showSpinner(){
    //$('#pdfReaderSpinner').css("visibility" , "visible");
    document.getElementById('pdfReaderSpinner').style.visibility = "visible";
    document.getElementById('pdfReaderSpinner').style.zIndex = 100000000;
}

I don’t think that the problem is in spinner, I can show it correctly at the first launching of the page, but I had to show the spinner in the document.ready function :

$(document).ready(function() { 
    var target = document.getElementById('loadingSpinner');
    spinner = new Spinner({top: 0, left: 0,color:'red'}).spin(target);
    showSpinner();
});

$(window).load(function(){
    initPdfReader();
    hideSpinner();
});
  • 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-10T05:11:26+00:00Added an answer on June 10, 2026 at 5:11 am

    Change this line:

    setTimeout(rotatePdfReader(),1000);
    

    to this:

    setTimeout(rotatePdfReader,1000);
    

    You want to pass the reference to the function to setTimeout so it can be called in 1 second. Currently you are passing the result of the function to setTimeout.

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

Sidebar

Related Questions

I created a Loading spinner in a SWF. I display this spinner in my
Is it possible to display a custom loading message when a user loads a
I am developing an android app in which i need to display images after
What is the best way to display a loading spinner in Django during a
I'm attempting to display loading progress for a WebView in an Android Activity. When
I wanted to display my data into android spinner from database. I used two
I would like to display a loading bar before the entire page is loaded.
hey i want to display a loading progress using ProgressDialog on my aplication, but
I am trying to display a Loading Image in a new JFrame when the
I am having hard time finding a way to display a loading image in

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.