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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T18:26:53+00:00 2026-05-10T18:26:53+00:00

Is it possible to set the cursor to ‘wait’ on the entire html page

  • 0

Is it possible to set the cursor to ‘wait’ on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run into:

  1. if an element (#id1) has a cursor style set it will ignore the one set on body (obviously)
  2. some elements have a default cursor style (a) and will not show the wait cursor on hover
  3. the body element has a certain height depending on the content and if the page is short, the cursor will not show below the footer

The test:

<html>     <head>         <style type='text/css'>             #id1 {                 background-color: #06f;                 cursor: pointer;             }              #id2 {                 background-color: #f60;             }         </style>     </head>     <body>         <div id='id1'>cursor: pointer</div>         <div id='id2'>no cursor</div>         <a href='#' onclick='document.body.style.cursor = 'wait'; return false'>Do something</a>     </body> </html> 

Later edit…
It worked in firefox and IE with:

div#mask { display: none; cursor: wait; z-index: 9999;  position: absolute; top: 0; left: 0; height: 100%;  width: 100%; background-color: #fff; opacity: 0; filter: alpha(opacity = 0);}  <a href='#' onclick='document.getElementById('mask').style.display = 'block'; return false'> Do something</a> 

The problem with (or feature of) this solution is that it will prevent clicks because of the overlapping div (thanks Kibbee)

Later later edit…
A simpler solution from Dorward:

.wait, .wait * { cursor: wait !important; } 

and then

<a href='#' onclick='document.body.className = 'wait'; return false'>Do something</a> 

This solution only shows the wait cursor but allows clicks.

  • 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. 2026-05-10T18:26:54+00:00Added an answer on May 10, 2026 at 6:26 pm

    I understand you may not have control over this, but you might instead go for a ‘masking’ div that covers the entire body with a z-index higher than 1. The center part of the div could contain a loading message if you like.

    Then, you can set the cursor to wait on the div and don’t have to worry about links as they are ‘under’ your masking div. Here’s some example CSS for the ‘masking div’:

     body { height: 100%; } div#mask { cursor: wait; z-index: 999; height: 100%; width: 100%; } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to set the DataContext property of a usercontrol after the user
Is it possible to set the cursor position in a Tkinter Text widget? I'm
Is it possible to use JavaScript to set the cursor attribute to the property
I'm wondering how to set the mouse cursor position under X11? Is it possible
Hi, I know that its possible to set the cusor to hand when hovering
I already found out that it is possible to set the value of a
Is possible to set an image as an iPhone application unique icon in code
Is it possible to set code behind a resource dictionary in WPF. For example
Is it possible to set the data in a ContentPlaceHolder through code? This is
Is it possible to set the position of the tabs to be at the

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.