crawl_in_usa
08-04-2006, 02:42 PM
I'm just starting with java and trying to make small think to work.
I'm using image thumbnail viewer
<script language="javascript">
imgFile = new Array()
imgFile[1] = "/images/1_670.jpg"
imgFile[2] = "/images/2_670.jpg"
imgSrc = new Array()
for(i=0;i<imgFile.length;i++) {
imgSrc[i] = new Image()
imgSrc[i].src = imgFile[i]
}
imgLink = new Array()
imgLink[1] = "/1/"
imgLink[2] = "/2/"
</script>
and than thumbnail images
<a href="#" onClick="document.visible.src=imgSrc[1].src; visible1.href=imgLink[1]" title="image 1"><img src="/images/thumb_1.jpg"></a>
<a href="#" onClick="document.visible.src=imgSrc[2].src; visible1.href=imgLink[2]" title="image 2"><img src="/images/thumb_2.jpg" /></a>
and finaly I'm showing big images which are going to switch when you click on thumbnail
<a name="visible1" href="/1/"><img name="visible" src="/images/1.jpg" /> </a>
I have no problems with switching images, but I need link to change too and it seems to be a problem. In IE 6.0 everything works normal, but in FF links don't change.
What is wrong with FF?
May be there is a better solution for my problem?
I'm using image thumbnail viewer
<script language="javascript">
imgFile = new Array()
imgFile[1] = "/images/1_670.jpg"
imgFile[2] = "/images/2_670.jpg"
imgSrc = new Array()
for(i=0;i<imgFile.length;i++) {
imgSrc[i] = new Image()
imgSrc[i].src = imgFile[i]
}
imgLink = new Array()
imgLink[1] = "/1/"
imgLink[2] = "/2/"
</script>
and than thumbnail images
<a href="#" onClick="document.visible.src=imgSrc[1].src; visible1.href=imgLink[1]" title="image 1"><img src="/images/thumb_1.jpg"></a>
<a href="#" onClick="document.visible.src=imgSrc[2].src; visible1.href=imgLink[2]" title="image 2"><img src="/images/thumb_2.jpg" /></a>
and finaly I'm showing big images which are going to switch when you click on thumbnail
<a name="visible1" href="/1/"><img name="visible" src="/images/1.jpg" /> </a>
I have no problems with switching images, but I need link to change too and it seems to be a problem. In IE 6.0 everything works normal, but in FF links don't change.
What is wrong with FF?
May be there is a better solution for my problem?