Click here to Skip to main content
15,557,965 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

In my web application , a regular flow on page is like below:

-- Whenever User clicks on any button , I need to show them three pop-up messages with 1) Asking confirmation of user , if user click OK execute related process else do nothing. 2) After having OK confirm message from user my web page is actually making SSH call and executing script in this script call I am passing control values and then waiting for scripts response like success or failure. Execution time of single script is min. 30mins during this time I need to show Progress Bar or Spinning Circle on web-page so User can have knowledge of background process and also want to make all controls accessibility to false. 3) After Getting script response Progress Bar should disappear and related success or failure message need to pop-up in another message box for user acknowledgment.

Can anyone provide me some basic code idea?
Posted
Comments
Sunasara Imdadhusen 2-Mar-11 23:44pm    
Did you try anything before?
MissDev 3-Mar-11 9:59am    
NO I did not.
Do you have any idea regarding this?
Albin Abel 3-Mar-11 0:36am    
Making a website waiting for 30 mints is not a good idea. But there are situations like large file uploading etc. Your case is a server process which you can execute in an async mode and use ajax call if you want to show a progress bar.
MissDev 3-Mar-11 9:58am    
Hey

In my web application , situation is every button click event going to call UNIX script which takes more than 30mins to gets completed so that's the reason I have to show any sort of message to user to wait until its done.

I have never used Progress Bar before , Do you any code available similar to my situation.

Execution time of single script is min. 30mins
:omg:
Do you really think it's worth a try? Or even a Progress bar can resolve your issue and keep the user waiting? I really doubt. Even if there is a progress bar, if it takes more than 3-4 min maximum, I will close the application and restart, assuming something went wrong.

Before suggesting Progressbar thing, I would ask you to think, re-design and make your application such that it takes much less a time. Here, you keep the UI blocked for 30 odd minutes, unacceptable.


Now, how to put progress bar:
1. Since it's script running and all, you already have a event/handler to client side Javascript at the needed points
2. Just put a div at the top of your page(to block all controls access) and show an image(progressing work) via Javascript when process starts
3. Hide the div and image when the process ends (success & failure)

It's a simple process, in case needed just Google for showing a div/image using Javascript.
 
Share this answer
 
Comments
MissDev 3-Mar-11 9:55am    
Thank you so much for your reply.

Unfortunately I can not change my design spec. This is what I have to develop. As all my UNIX script takes min 30mins for execution I have to show user some sort of mechanism of background process. And one more challenging matter is on every single page I have so many buttons each of them going to call UNIX script and i have to wait for their result.

Please if you can help me in developing code for showing progress bar or anything similar to that.
Sandeep Mewara 3-Mar-11 10:04am    
Unfortunately I can not change my design spec. This is what I have to develop. As all my UNIX script takes min 30mins for execution I have to show user some sort of mechanism of background process. And one more challenging matter is on every single page I have so many buttons each of them going to call UNIX script and i have to wait for their result.
Thats ok.

Please if you can help me in developing code for showing progress bar or anything similar to that.
I already did! Did you try? Or, are you expecting a code from me here?
BTW, it's too common a thing. You will find lots of links on web if you try to look for it, in case needed.
I've solved something similar. The user starts a lengthy data export via an aspx page. On the server side a background worker is created that reports its progress. The server needs to remember which user started what kind of exports. The background worker uses the OnProgressChanged or ReportProgress methods to give its current status. Server side tracks the status information of of the background worker processes. The user can now logoff or do whatever he pleases. When the user comes back at a later time he can display a list of all the processes he started and what their current state is: Running and the respective progress or that the process has finished.
The page that displays the current status of the process list uses AJAX calls to retrieve the information about the current state of a process. In my case a process was identified by UserID and ProcessID since one user was able to start more than one process.

Cheers!
 
Share this answer
 
Comments
MissDev 3-Mar-11 9:56am    
Hey

How did you solved your problem? Can you also give me some coding help here to solve my issue?
Manfred Rudolf Bihy 4-Mar-11 9:00am    
The description I gave in my answer pretty much wraps up the way I solved it. Which part of the solution are you having problems with when trying to code it?
I solved it. I used thread in my button click and showing pop-up window having progress bar in it.

Thank you so much for all support.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900