how to select a value randomly

on my desktop i am using the kde rotating desktop image option. this rotates images randomly every half hour. now, i would like to write an html file which will have an inline frame with some text, maybe system messages, or my friends live journal thati read alot, or unix.com! however, i dont want to give up my rotating desktop images.

my proposal:

define one variable that would equal a value from a given set of OTHER variables. say i have

String picture;

then i have

String picture1=picture1location;
String picture2=picture2location;

and so on, i have maybe 50 images.

how can i make the first string 'picture' randomly equal the value of picture1 or picture2 or picture3 etc etc.?

further more, after i sort that out, how can i then set the value of 'picture' to the html file's background image?

at first i was gonna use SSIs, but i realized that there is no server to interpret the SSIs because the file is going to reside on my desktop in the same directory as all of my image files. i think javascript would be good for this, or PHP?

ill have the page refresh every 30 minutes.
well if anyone can help thatd be great.

all i really need is a way to change a background image in an html page randomly at a given interval.

thanks again! :slight_smile:

This issue becomes irrelevant if the page is dynamically created (e.g. via Perl) at each auto refresh (<META http-equiv="refresh" content="1800").

A little config file could be used to specify the pictures which you could also set up via an HTML page.