well.. JS is NOT my strong point, but it would be something like this:
on the buy link:
Code:
<form action="part2.html" method="post">
<a href= "prints.html" name=image_thumb value="image1">Click here to buy print</a>
</form>
and in the JS script on prints.html:
Code:
<script type="text/javascript">
function showimage(t)
{
if (!document.images)return;
document.images[t.getAttribute("name").replace("select","pics")].src=t.options[t.selectedIndex].value
else{ document.images = <?php echo $_POST["image_thumb"]; ?>
}
</script>
basically you tell the script if nothing is selected from the drop down, then use the posted attribute for "image_thumb" which you have given a value on clicking the link previous.
Bookmarks