Jump to content
Old threads will finally start getting archived Γ—
🚨🚨 GAME-CHANGING ANNOUNCEMENT FROM PHP FREAKS 🚨🚨 Γ—

Change picture every x seconds..


Mistral πŸ€–

Recommended Posts

[quote author=DeathStar link=topic=117999.msg481829#msg481829 date=1165696319]
Maybe this should be in javascript... :-\

I have alot af pictures..(logos)

I want 1 to display every x seconds..
or change everytime the page loads..
[/quote]

Which do you want?  First is simplest with javascript, second is trivial with javascript or php
The only way you could possibly do that in PHP would be to dynamically generate an image using PHP's image functions...but I'm not sure that you can draw multiple frames to a file (i.e., a GIF) nevermind setting the duration of the frame or the undraw method.

Though I'm pretty well against using JavaScript...this is one time where PHP just won't cut it. :-\
But he said he needed it to change ever X seconds. Since you can't use headers after content has been sent (i.e., the image), that wouldn't work.

It would of course work to make the image different on every page refresh...but then wouldn't it be more fun to make it generate a random image? Well...he did say he wanted it like a slideshow...but what kind of slideshow goes around expecting you to click refresh all the time? :P
[quote author=monkey_05_06 link=topic=117999.msg486894#msg486894 date=1166398044]
But he said he needed it to change ever X seconds. Since you can't use headers after content has been sent (i.e., the image), that wouldn't work.

It would of course work to make the image different on every page refresh...but then wouldn't it be more fun to make it generate a random image? Well...he did say he wanted it like a slideshow...but what kind of slideshow goes around expecting you to click refresh all the time? :P
[/quote]

Well, then look at this: http://www.xaos-ia.com/daniel/non_javascript_slideshow/
I know it isn't a header, but I used the meta tag instead. Gives the same functionality.

(I got a headache when making it)
Here's the sources: http://xaos-ia.com/daniel/non_javascript_slideshow.zip

[quote author=DeathStar link=topic=117999.msg488146#msg488146 date=1166536980]
http://www.xaos-ia.com/daniel/non_javascript_slideshow/?picture=3

I was almost blinded  :o :o :o
lol
[/quote]
It's Web0.5 ;)

Edit: teting attachments

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.