...not defined
Hi there
I've got this script that I'm using and I keep getting an error saying
't1 is undefined' on the line
t1.src = "image_bin/thumbs/<%=strT1%>"
I thought I was defining it on this same line.
Basically what I'm attempting is to try and change the image when someone mouses over a thumbnail.
Here's the script below.
<script language="JavaScript" type="text/javascript">
if (document.images) {
Thumb1 = new Image
Thumb2 = new Image
Thumb3 = new Image
Thumb4 = new Image
Thumb5 = new Image
t1.src = "image_bin/thumbs/<%=strT1%>"
t2.src = "image_bin/thumbs/<%=strT2%>"
t3.src = "image_bin/thumbs/<%=strT3%>"
t4.src = "image_bin/thumbs/<%=strT4%>"
t5.src = "image_bin/thumbs/<%=strT5%>"
}
else {
t1 = ""
t2 = ""
t3 = ""
t4 = ""
t5 = ""
document.main = ""
}
function chgImg(imgField,newImg) {
if (document.images) {
document[imgField].src= eval(newImg + ".src")
}
}
</script>
thanks alot
Adam
|