css5
04-10-2004, 12:41 AM
I cannot get this to work - I've tried everything.
I have a column of three images and one large image right next to it. I want the user to be able to click the small thumbnail and have it enlarge in the large image box next to it.
Here is my global script:
function swapImage(strElement, objImage) {
// this function swaps the image identified by strElement for a new one preloaded as objImage
if (document.images && objImage && objImage.src && objImage.src != "") {
if (document.images[strElement] && document.images[strElement].src != objImage.src) {document.images[strElement].src = objImage.src;
}
}
Here it is in the html:
The large image:
<td><img src="images/single_fin/1_lg.jpg" width="400" height="300" border="0" name="enlargeImage"/></td>
The small image:
<td><a href="#" onclick="return enlargeImage('images/single_fin/1_lg.jpg', 'Single Fin', 1);"><img src="images/single_fin/2_sm.jpg" alt="" width="130" height="90" border="0"/></td>
All I'm getting in the browser is the reference on the status bar "#", not swap.
Thanks for any help.
}
I have a column of three images and one large image right next to it. I want the user to be able to click the small thumbnail and have it enlarge in the large image box next to it.
Here is my global script:
function swapImage(strElement, objImage) {
// this function swaps the image identified by strElement for a new one preloaded as objImage
if (document.images && objImage && objImage.src && objImage.src != "") {
if (document.images[strElement] && document.images[strElement].src != objImage.src) {document.images[strElement].src = objImage.src;
}
}
Here it is in the html:
The large image:
<td><img src="images/single_fin/1_lg.jpg" width="400" height="300" border="0" name="enlargeImage"/></td>
The small image:
<td><a href="#" onclick="return enlargeImage('images/single_fin/1_lg.jpg', 'Single Fin', 1);"><img src="images/single_fin/2_sm.jpg" alt="" width="130" height="90" border="0"/></td>
All I'm getting in the browser is the reference on the status bar "#", not swap.
Thanks for any help.
}