Im currently putting a website together adn ive come across a problem that im having difficulty solving.
I've got several images in my gallery page, using the javascript, and the onclick function, I have all images appearing in the center of the page when click.
I want to use the center image as a hyperlink, going to a different page depending on whick picture is there.
Im totally inexperienced at javascript, can anybody give me any suggestions?
<SCRIPT language="JavaScript">
<!--
if (document.images)
{
Elements_Color= new Image(177,118);
Elements_Color.src="Website_Files/Images/Web_product_images/Elements_Colour.jpg";
Drafting_Color= new Image(177,118);
Drafting_Color.src="Website_Files/Images/Web_product_images/Drafting_Colour.jpg";
}
function change1(picName,imgName)
{
if (document.images)
{
imgOn=eval(imgName + ".src");
document[picName].src= imgOn;
}
}
//-->
</script>
</head>
<body>
Thanks so much for that, it works perfectly.
I was along the right lines when i was trying to sort it, but i missed a few key lines out haha, nevermind.