Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Change the mouse cursor to hourglass

 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I want to change the cursor to hour glass whenever I hit the submit button.

I have a javascript like below.





jsp page



But it is not changing to hour galss.

How would do I change to hour glass when I click the submit button?

thanks











 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Once the form starts submitting all activity on the page stops as it is unloaded and awaits the response to render the next page.
 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So, Is it possible to change the mouse cursor to hour glass, when it post the page to next page?


Can you please give me one example?

Otherwise, what is the other option to change to hour glass.


Thanks


 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
anvi kon wrote:So, Is it possible to change the mouse cursor to hour glass, when it post the page to next page?

Ummm, no. That's what I just said. Until the next page loads, the browser can't do much of anything. And you don't want to show the wait cursor after the next page is already loaded.

Otherwise, what is the other option to change to hour glass.

The only option is to use Ajax to make the request rather than a form submission. But adding the complexity of Ajax into the mix just to get a silly little cursor seems like serious overkill.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic