Progress bar problem

G

Guest

Dear:

I need to make some progress action when doing long running task to inform
user that something is happening, so I did the following:

1. download a gif file that do some download animation.
2. in my aspx page add DIV and put the image inside it and make it runat
server with initial display as none.
3. in page load for send button i did
btnSend.Attributes["onclick"] = "return SwapButton()"
4. in client side of page the SwapButton function
function SwapButton()
{
divProgress.style.display = 'block'; //Display progress image
oButton = document.getElementById('btnSend');
if(oButton != null)
oButton.style.display = 'none' //hide send button
}

5 . and at the end of OnClick function of btnSend on codebehind i did
btnSend.Attributes["DISPLAY"] = "block"
divProgress.Attributes["DISPLAY"] = "none"

the PROBLEM i have that the animated gif image is not doing the animation
work , it is freezed , WHY?
what should I do to let the animated gif appears animated?

Best Regards
 
B

bruce barker

when IE does a get/post, it normally stops the background thread that
implements the animation. you need to use the meta tag to poll for results
if you want the gif to work.

-- bruce (sqlwork.com)

| Dear:
|
| I need to make some progress action when doing long running task to inform
| user that something is happening, so I did the following:
|
| 1. download a gif file that do some download animation.
| 2. in my aspx page add DIV and put the image inside it and make it runat
| server with initial display as none.
| 3. in page load for send button i did
| btnSend.Attributes["onclick"] = "return SwapButton()"
| 4. in client side of page the SwapButton function
| function SwapButton()
| {
| divProgress.style.display = 'block'; //Display progress image
| oButton = document.getElementById('btnSend');
| if(oButton != null)
| oButton.style.display = 'none' //hide send button
| }
|
| 5 . and at the end of OnClick function of btnSend on codebehind i did
| btnSend.Attributes["DISPLAY"] = "block"
| divProgress.Attributes["DISPLAY"] = "none"
|
| the PROBLEM i have that the animated gif image is not doing the animation
| work , it is freezed , WHY?
| what should I do to let the animated gif appears animated?
|
| Best Regards
|
|
 
G

Guest

May you please provide me with more info about how to use the meta tag to
poll for results, i never heard about this?

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,061
Latest member
KetonaraKeto

Latest Threads

Top