|
Posted by Jim Moe on 12/30/89 11:40
©® wrote:
> I am using a script to generate a random picture on a friend's personal
> website. It changes whenever refreshed.
> Below the picture, you will see text. At the moment the text stays the
> same because it is just html below the photo.
> Ideally I would like the caption to be relevant to the picture but I
> actually have no idea how to do it.
>
Use a backend store like a flat file, database, or even a Javascript
array, to list all the info about available images to pick: name, height,
width, caption, title, alt text, etc.
Then use a random selection to pick the data group and write it to the page.
BTW: You should replace "&" in the URLs with "&".
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Navigation:
[Reply to this message]
|