Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

change cursor to an hourglass  RSS feed

 
Ken Nesk
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I would like to change the cursor to an hourglass when a JSP page is loading. I am not using Swing or an applet - just plain JSP and servlets. Does anyone know how I might do this?
Thanks.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't think it is possible for plain JSP and servlets to affect the cursor on the client's machine. Just glancing through a Javascript book, there does not even seem to be a way with JavaScript.
Bill
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can affect how the cursor appears on your pages using the cursor style attribute, but that won't affect what it looks like while the page is loading. There's certainly no standardized way to do that -- whether IE has some MS priorietary extension that might allow it, I have no knowledge.
hth,
bear
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a JSP question, but an easy question for me.
http://www.w3.org/TR/REC-CSS2/ui.html#cursor-props
selector-text{
cursor: wait;
}
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66142
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Uh yes, excellent reference, but again that won't help him out with changing how the cursor appears between pages.
I suppose he could try setting the cursor shape for the whole page via Javascript just prior to submission of a form... I don't know how long the effect would persist when loading a slow subsequent page. And I certainly wouln't rely on it acting the same across browsers.
bear
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It looks like that feature is new with CSS2 - how widespread is support for CSS2 in browsers?
Bill
Cool - I found a great source for that information.
Page on CSS feature support
[ August 17, 2003: Message edited by: William Brogden ]
 
Garrett Smith
Ranch Hand
Posts: 401
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
MSIE doesn't really change to a wait cursor when the document is loading. How about that.
Go download a browser that does not suck. You'll be pleased to see that the hourglass is displayed when the page loads
 
Dana Hanna
Ranch Hand
Posts: 227
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Might I ask why your page is taking so long to load?
With IE, it doesn't need to show that icon because it loads pages so fast. <smile>
 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!