This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes JSF and the fly likes Progress bar is not appearing when java script is executing. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » JSF
Bookmark "Progress bar is not appearing when java script is executing." Watch "Progress bar is not appearing when java script is executing." New topic
Author

Progress bar is not appearing when java script is executing.

Balaji Soundarajan
Ranch Hand

Joined: Jan 23, 2009
Posts: 59
I am using JSF in my project.i am calling javascript function in the command button.The java script function taking one minute to complete.in that time,the progress bar is not displayed in IE. Can we have progress bar while java script execution?

Please do the needfull.

Thanks
--Balaji.S
Dawn Charangat
Ranch Hand

Joined: Apr 26, 2007
Posts: 249
Sure you can...

All you need is a progress bar imitating gif file and place it in a <div> in your webpage, and hide it at page load. Now, when you want to execute the javascript function which you mentioned is time consuming, un-hide this <div>. You can hide it again once the execution of script is completed.

Else if you want to be more adventurous, you can create the progress bar magic using <div> and <span> tags alone, without the gif.

Dawn.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
What progress bar are you talking about? The one which you wrote in JS or the browser's default one? You should not rely on the webbrowser used. Just let JS display/change some progress bar or the cursor style using HTML DOM and CSS.
Balaji Soundarajan
Ranch Hand

Joined: Jan 23, 2009
Posts: 59
Thanks for your reply, here i am talking about the web browser progress bar.
Bauke Scholtz
Ranch Hand

Joined: Oct 08, 2006
Posts: 2458
There you have completely no control over.

Play more with DOM/CSS.
 
GeeCON Prague 2014
 
subject: Progress bar is not appearing when java script is executing.