By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,921 Members | 1,466 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,921 IT Pros & Developers. It's quick & easy.

animated gifs with codebehind...

P: n/a
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.
Mar 16 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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.

"Dale Reed" <da**@dmbse.co.uk> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
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.

Mar 16 '06 #2

P: n/a
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.

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:O1**************@TK2MSFTNGP11.phx.gbl...
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.

"Dale Reed" <da**@dmbse.co.uk> wrote in message
news:Ob**************@TK2MSFTNGP10.phx.gbl...
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.


Mar 17 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.