473,378 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Animated GIF affected by location.replace

Al
Hi all...

I have created an aspx page that contains an animated GIF. I am using
javascript and location.replace to redirect from this page to another aspx
page which takes several seconds to load. When location.replace is called the
animated GIFs in the first page stop animating.

Is this standard behaviour? If so, is there an easy work around to prevent
this?

Thanks in advance
Nov 18 '05 #1
3 3420
this is normal for IE - threads are stopped during postback in expection of
an unload.

the most common approach is to use poll the server for status, with a meta
refresh or script, so the gif runs during the delay between polls. if you
pre cache the image and use frames, you sometimes an get the image to run,
but not always.

-- bruce (sqlwork.com)

"Al" <Al@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Hi all...

I have created an aspx page that contains an animated GIF. I am using
javascript and location.replace to redirect from this page to another aspx
page which takes several seconds to load. When location.replace is called the animated GIFs in the first page stop animating.

Is this standard behaviour? If so, is there an easy work around to prevent
this?

Thanks in advance

Nov 18 '05 #2
I ran into the same problem way back using classic ASP. As soon as you submit
a page, the animated gif stops doing it's stuff.
The simplest solution is to use client sided javascript to preload the image
and reset the source of the image after you submit the form (or
location.replace):
//preload images when that page loads
var preloadedImg = new Image(32,32);
preloadedImg.src = 'images\img.gif';

//then comes the redirect or form submit or whatever
location.replace;
document.images['imageTag'].src=preloadedImg.src;

...:: daniel last ::..
"bruce barker" wrote:
this is normal for IE - threads are stopped during postback in expection of
an unload.

the most common approach is to use poll the server for status, with a meta
refresh or script, so the gif runs during the delay between polls. if you
pre cache the image and use frames, you sometimes an get the image to run,
but not always.

-- bruce (sqlwork.com)

"Al" <Al@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Hi all...

I have created an aspx page that contains an animated GIF. I am using
javascript and location.replace to redirect from this page to another aspx
page which takes several seconds to load. When location.replace is called

the
animated GIFs in the first page stop animating.

Is this standard behaviour? If so, is there an easy work around to prevent
this?

Thanks in advance


Nov 18 '05 #3
Al
Thanks - this works perfectly.

"dainel last" wrote:
I ran into the same problem way back using classic ASP. As soon as you submit
a page, the animated gif stops doing it's stuff.
The simplest solution is to use client sided javascript to preload the image
and reset the source of the image after you submit the form (or
location.replace):
//preload images when that page loads
var preloadedImg = new Image(32,32);
preloadedImg.src = 'images\img.gif';

//then comes the redirect or form submit or whatever
location.replace;
document.images['imageTag'].src=preloadedImg.src;

..:: daniel last ::..
"bruce barker" wrote:
this is normal for IE - threads are stopped during postback in expection of
an unload.

the most common approach is to use poll the server for status, with a meta
refresh or script, so the gif runs during the delay between polls. if you
pre cache the image and use frames, you sometimes an get the image to run,
but not always.

-- bruce (sqlwork.com)

"Al" <Al@discussions.microsoft.com> wrote in message
news:EF**********************************@microsof t.com...
Hi all...

I have created an aspx page that contains an animated GIF. I am using
javascript and location.replace to redirect from this page to another aspx
page which takes several seconds to load. When location.replace is called

the
animated GIFs in the first page stop animating.

Is this standard behaviour? If so, is there an easy work around to prevent
this?

Thanks in advance


Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: James Marshall | last post by:
I'm trying to override location.replace() but I can't. I can override window.open(), document.write(), and other built-in methods, but not location.replace(). Here's a demo that overrides two...
3
by: DOK | last post by:
I'm trying to create an eBay ad. So far, I've got the page the way I want it. However, the few animated gif's I have on the page display but are no longer animated. I can get it to work in...
5
by: spam_me_ not | last post by:
I already understand that one cannot disable a browser's forward and back functions. This is a situation where I have code working in Mozilla V1.6 and would like something similar for Opera and...
2
by: JHB | last post by:
Hi, How can I do a location.replace when I use a form, like when I use a href? This works. <a href="Ny HTML-side20.htm"; method="post" id="frm" name="BrugerHovedSide"...
9
by: John J. Hughes II | last post by:
Is it possible using Image or Bitmap to build and save an animated GIF file? I am not have a problem saving the GIF file just getting the frames added to it. I did find ImageAnimator but it only...
0
by: PowerPlane | last post by:
Hi, all Happy valentine I am struggling to insert an animated-gif into a CRichEditCtrl. Before I post this question here, I did some googling. And I found an article to introduce how to insert a...
12
by: Jack | last post by:
Since, I have not got some desired advise, I am reposting this for some asnwer/valuable suggestion. Thanks. THE FOLLOWING IS A PART OF CODE FROM A ASP PAGE <% sql01 = "SELECT COUNT(*) AS...
3
by: larystoy | last post by:
How to get an animated GIF to function in V6 I have an animated dove that was too lazy to flap his wing when flying across the screen. Of course VB6 doesn't see animated GIF's, so got this one...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.