wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Change the mouse cursor to hourglass Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Change the mouse cursor to hourglass" Watch "Change the mouse cursor to hourglass" New topic
Author

Change the mouse cursor to hourglass

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
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

Joined: Jan 10, 2002
Posts: 60041
    
  65

Once the form starts submitting all activity on the page stops as it is unloaded and awaits the response to render the next page.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
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

Joined: Jan 10, 2002
Posts: 60041
    
  65

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.
 
 
subject: Change the mouse cursor to hourglass
 
Similar Threads
probleme scriptlet in javaScripts
Struts 1 :- Two Form submission from one jsp using one submit button
struts-2 (set values to action class)
Struts 2 <s:submit action > and javascript help
Extracting a parameter from c:out value