You say you have links or buttons with id's that represent the image's filename minus both the path and extension. If all images are in the same folder and all have the same extension, strings will suffice for adding that information. You can setup a container with an image in it, the src attribute can be either a blank image or one that you would like loaded when the page first loads, ex:
You could have a button:
<div><img id="displayImage" src="blank.gif"></div>
Say the path to your images is /images/show_2/ and they are all .jpg:
<input type="button" id="neat_picture" onclick="idisplay(this);">
That will load:
into the id="displayImage'" img tag. You can have as many of those buttons as you like, each with a different id corresponding to a different image.
- Server side code
- A link that contains the full path to the image as its href.