Avatar billede zux Nybegynder
04. januar 2000 - 16:05 Der er 6 kommentarer og
1 løsning

change page when animated GIF is finish

this is maybe JavaScript, but I placed it here. How can I make a page refresh into another after an animated GIF is finished playing??? I use the META tag
http-equiv with refresh and content on 5 second before enter new page. But on slow connection the animated GIF use more than that time to load! And with fast connection they will have to wait several seconds after the animation is finish! How can I fix this???
Avatar billede !asp Nybegynder
04. januar 2000 - 16:49 #1
I'd do like this :

<HTML>
<HEAD>
<TITLE>change page when animated GIF is finish</TITLE>
<SCRIPT>
<!-- play hide --
function MyFunk() {
var GifLoadTime = 5;
setTimeout("document.location.href='nextpage.html'", GifLoadTime);
}
-- The End -->
<SCRIPT>
</HEAD>
<BODY OnLoad="MyFunk()">

<IMG NAME="Ani1" SRC="ani.gif">

</BODY>
</HTML>

Not tested! But it should do the work. Just set GifLoadTime to the animated gif's playing time.
Avatar billede olebole Juniormester
04. januar 2000 - 20:05 #2
That won't work either, as you don't know the actual d/l speed for the user. It could be 5 sec or it could be 15 - for the same pic.
You can only solve this in NN. You can place an 'onload' call in the img_tag that counts up a variable. It will then count up one step every time NN loads a new frame.
You can then choose to change the document.location at a certain size of the variable - according to the number of frames your gif is holding.
But this *only* works in NN :( I don't think it's solvable in IE at all.
Rgrds/
Ole Clausen
Avatar billede olebole Juniormester
04. januar 2000 - 20:11 #3
And even if the gif is already d/l'ed, the playing speed will be dependent on the how much free memory the user has left on his machine at the time of playing.
Avatar billede bromer Nybegynder
04. januar 2000 - 21:16 #4
Isen't there anyone who herd about "bern all gifs day". Use .png insted, got damit
Avatar billede olebole Juniormester
04. januar 2000 - 21:35 #5
I will, when they are supported more widely...!
Avatar billede zux Nybegynder
06. januar 2000 - 18:35 #6
I can't do that with .pgn either...
Avatar billede olebole Juniormester
06. januar 2000 - 23:38 #7
OK, let me rephraze my answer:
You can't - except in NN (read above)!!!
That answers your question.
/VH
Ole
Avatar billede Ny bruger Nybegynder

Din løsning...

Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.

Loading billede Opret Preview
Kategori
Vi tilbyder markedets bedste kurser inden for webudvikling

Log ind eller opret profil

Hov!

For at kunne deltage på Computerworld Eksperten skal du være logget ind.

Det er heldigvis nemt at oprette en bruger: Det tager to minutter og du kan vælge at bruge enten e-mail, Facebook eller Google som login.

Du kan også logge ind via nedenstående tjenester