oliverlong
07-01-2005, 02:36 PM
This may be a little obvious and a javascript problem but on a navigation link click, i want to dynamically change the images in the CMotion bar when a new 'garden' selected. This is the script to change the id of the image:
for (i=1; i<mainArray[arrayNo-1].length; i++)
{
thumb = "thb"+(i);
ImageMain.src = "images/thb_" + mainArray[arrayNo-1][i];
document.getElementById(thumb).src = ImageMain.src;
}
in the html
<div id="motioncontainer" style="position:relative;width:200px;height:100px;overflow:hidden;">
<div id="motiongallery" style="position:absolute;left:0;top:0;white-space: nowrap;">
<nobr><a href="javascript:imgPopUp('1')"><img id="thb1" src="images/thb_1.jpg" border=1></a>
<a href="javascript:imgPopUp('2')"><img id="thb2" src="images/thb_2.jpg" border=1></a>
<a href="javascript:imgPopUp('3')"><img id="thb3" src="images/thb_3.jpg" border=1></a>
<a href="javascript:imgPopUp('4')"><img id="thb4" src="images/thb_4.jpg" border=1></a>
<a href="javascript:imgPopUp('5')"><img id="thb5" src="images/thb_5.jpg" border=1></a></nobr>
</div>
</div>
Take a look at the site if you like:
http://www.oliverlong.plus.com/joyjardine/gall.htm
My apologies for the photos!
As you can see i am trying to impliment the image system with a navigation bar to allow for multiple sets of images. I'm declare this open source code so please feel free to take what i have done if you like it so far.
Thanks in advance!
for (i=1; i<mainArray[arrayNo-1].length; i++)
{
thumb = "thb"+(i);
ImageMain.src = "images/thb_" + mainArray[arrayNo-1][i];
document.getElementById(thumb).src = ImageMain.src;
}
in the html
<div id="motioncontainer" style="position:relative;width:200px;height:100px;overflow:hidden;">
<div id="motiongallery" style="position:absolute;left:0;top:0;white-space: nowrap;">
<nobr><a href="javascript:imgPopUp('1')"><img id="thb1" src="images/thb_1.jpg" border=1></a>
<a href="javascript:imgPopUp('2')"><img id="thb2" src="images/thb_2.jpg" border=1></a>
<a href="javascript:imgPopUp('3')"><img id="thb3" src="images/thb_3.jpg" border=1></a>
<a href="javascript:imgPopUp('4')"><img id="thb4" src="images/thb_4.jpg" border=1></a>
<a href="javascript:imgPopUp('5')"><img id="thb5" src="images/thb_5.jpg" border=1></a></nobr>
</div>
</div>
Take a look at the site if you like:
http://www.oliverlong.plus.com/joyjardine/gall.htm
My apologies for the photos!
As you can see i am trying to impliment the image system with a navigation bar to allow for multiple sets of images. I'm declare this open source code so please feel free to take what i have done if you like it so far.
Thanks in advance!