animated gifs with codebehind...

D

Dale Reed

Hi,

I have a button on an aspx page (I'm using vs2005 with asp2), which when
clicked takes a while to do some data processing before it posts back to the
screen to display the results.

I therefore created a little animated gif, which, when the button is
clicked, I display using javascript in a floating div, the idea being that
the animation shows that something is happening until the postback occurs.

The problem is, as soon as the button is clicked, the animation actually
stops until the page reloads! I thought I was doing something wrong but I
turned it so it was permanently visible, the animation is working fine until
the button is clicked, then it stops dead until the page reloads.

Has anyone else had this issue? Is it just ie or will this occur with all
browsers, and more importantly is there a way to fix it? I can easily just
display some static text (please wait or something) but the animation is
just handy to show people that something is happening, and they should wait
for the results.

Any help appreciated!

Dale.
 
K

Kevin Spencer

The animation stops because the browser is making a new request. This is
typical browser behavior (at least with IE). The only way around it would be
to use a separate browser window to display the graphic. However, the
separate browser window would not be available to the newly-loaded HTML
document instance in the parent browser. Well, I can think of one other way,
which would involve using a frameset with the GIF loaded into a frame that
expands until the new document is loaded. Since the 2 frames share the same
parent window, the new document could tell the parent to hide the other
frame.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer

Presuming that God is "only an idea" -
Ideas exist.
Therefore, God exists.
 
D

Dale Reed

I've tried putting it into a seperate html file, then display it in an
iframe on the form, unfortunately that stops too. It works fine in firefox
and netscape, only seems to be ie that stops the animation in its tracks as
soon as you click on the button. I don't really want to use a pop up, for
the reasons you've covered plus most people have these turned off anyway.

Bit of a pain really, it seems to me like it's one of those times when you'd
want an animation to display, ie when you know your page is going to take a
while to reload, so why does ie stop all animated gifs? They are a strange
company sometimes, I'm sure they have their reasons! Looks like it will
need to be a bit of javascript to display a static image for ie and the
animation for everyone else, at least till I see if ie7 has the same issue!!

Thanks anyway, if anyone else has any information it would be appreciated!

Dale.
 

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

No members online now.

Forum statistics

Threads
473,989
Messages
2,570,207
Members
46,782
Latest member
ThomasGex

Latest Threads

Top