# HTML code - random pictures from a folder



## danniy (Oct 26, 2007)

Hello,

I tried to do this but probably i am too lazy to figure it out myself.

I want a short HTML code to show random pictures from a folder at a specified interval.
Nothing fency, just when i go on the page to see random pictures in a rectangle or something. Do you think it's possible do do this with HTML?

Thank you.


----------



## Ent (Apr 11, 2009)

No, it isn't possible. Html is designed for building static web pages. You can however do exactly what you're asking about quite easily using Javascript, a short program that runs in the browser and manipulates normal HTML web pages to give them an appearance of being interactive. If I were you I'd google Javascript slideshow for a few sample codes.


----------



## Squashman (Apr 4, 2003)

You would have to do it with a server side scripting language like PHP, Perl or ASP. Look at Hotscripts.com. They have plenty of free scripts you can download.

Otherwise you can do it within your html with javascript.
http://javascript.internet.com/miscellaneous/random-image.html

May want to ask a moderator to move this to Web Development.


----------



## Ent (Apr 11, 2009)

Query: I thought that any serverside script can only modify the initial content of a page, customizing names, pictures, etc, but cannot (short of reloading) modify the contents of that page. Therefore php and the others shouldn't be able to load a picture on a time interval, could they?


----------



## danniy (Oct 26, 2007)

Oh. Thank you so much for your answrs. I'll try java and get back to you when im done 

Have a nice day.
Danniy


----------



## Squashman (Apr 4, 2003)

My Bad. Thought he wanted the image changed on page reload. But javascript should be able to reload an image based on a timeout value.


----------

