04. januar 2000 - 16:05Der 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???
<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.
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
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.
OK, let me rephraze my answer: You can't - except in NN (read above)!!! That answers your question. /VH Ole
Synes godt om
Ny brugerNybegynder
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.