Random image link

4th November 2004

This script takes an existing image link, and randomly changes it into a different one. It works in all modern graphical browsers, plus Opera 5 and 6 (with javascript enabled):

Accessible Website Menu

Reload the page to see another random choice.

It's really just another random banner script, but crucially, it still provides content to unsupported browsers, without reliance on the less-than-reliable <noscript> paradigm - if scripting (or this script) is not supported, the default image or alt text will always be shown.

Get the script

Download the zipfile [12K], unzip it into your site directory and include the script on your page - it should go in the <body> section, after the link(s) you want to change, for example:

Begin by creating a new image link object, specifying the id of your link:

The script doesn't need a window.onload event, because it doesn't modify any document-level properties, nor require the default image to have finished loading. But if it's to work, the <script> include for imagelink.js must always come after the links themselves. It doesn't have to be directly after, just after.

Get the script

Usability widgets

Website gadgets

Bits of site functionality:

Local network apps

Web-applications for your home or office network:

Images

Image manipulation scripts:

Components

Parts for other scripting:

Novelties

More amusing than useful:


In this area

Main areas


[brothercake] came here for something, and found something else