This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Making current thread sleep in JS for progress bar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Making current thread sleep in JS for progress bar" Watch "Making current thread sleep in JS for progress bar" New topic
Author

Making current thread sleep in JS for progress bar

sandeep Kumar
Ranch Hand

Joined: Sep 19, 2007
Posts: 41
Hi All,

I am using a Dojo SortableTable in my application.When I perform some search on one of the columns, datta will be populated from data base. During this elapsed time, A progress bar is shown.

The problem is after getting the data to the browser, it performs a parse on the data, this parsing takes lot of time during which the progress bar is just stable for considerable amount of time.

So I wanted to make current thread sleep in the parse function of JS during iterations. I hope during that sleep time, the CPU time would be given to the progress bar.

If any one has got some information, please suggest me.

Thanks in Advance.

Regards,
Sandeep.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

JavaScript has no concept of threading.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
sandeep Kumar
Ranch Hand

Joined: Sep 19, 2007
Posts: 41
Hi Bear Bibeault,

First of all Thanks for your response.
But is there any way I could make my progress bar move during parsing?

Thanks/Sandeep.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60752
    
  65

When the script is busy doing one thing, all else is blocked.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Making current thread sleep in JS for progress bar
 
Similar Threads
Java swing background execution
Progress Bar
Progress bar is not appearing when java script is executing.
progressbar in real time and streams
Progress Bar