Hi there....
I know some one out there will be able to figure this out....it just isn't me.
I'm a graphics guy and my java coding is very limited.
I'm trying to have a gallery with thumbs on the bottom, back and next buttons on top and the pic in the middle.
I have a swap that works nice for the thumbs and an array with back and next functions for the top buttons. I need them to work together or a single script to control all of it....
Ultimately i need the photos and captions to swap from both the thimbs and top buttons, in harmony...HELP!
Heres what i have so far...
[HTML]<script language="JavaS cript" type="text/JavaScript">
<!-- This contros the thumbs... -->
function swapPhoto(photo SRC,theCaption) {
var displayedCaptio n = document.getEle mentById("capti on");
displayedCaptio n.firstChild.no deValue = theCaption;
document.images .imgPhoto.src = "images/realty/" + photoSRC;}
<!-- and for the back/next links... -->
var photos=new Array()
var which=0
photos[0]="images/realty/pic1.jpg"
photos[1]="images/realty/pic2.jpg"
photos[2]="images/realty/pic3.jpg"
photos[3]="images/realty/pic4.jpg"
photos[4]="images/realty/pic5.jpg"
function backward(){
if (which>0){
window.status=' '
which--
document.images .imgPhoto.src=p hotos[which]
}
}
function forward(){
if (which<photos.l ength-1){
which++
document.images .imgPhoto.src=p hotos[which]
}
else window.status=' End of gallery'
}
</script>
<!-- In the body of the html - for the main image... -->
<p><a href="javascrip t:backward()">& lt;<Back</a> - <a href="javascrip t:forward()">Ne xt>></a></p>
<p><img src="images/realty/pic1.jpg" name="imgPhoto" id="imgPhoto" /></p>
<p id="caption">.. .</p>
<!-- and for the thumbs... -->
<a href="javascrip t:swapPhoto ('pic1.jpg','ca ption')"><img src="images/realty/t_pic1.jpg" alt="Thumbnail" width="40" height="40" border="0" /></a>
[/HTML]
Now everything works, but if i browse by thums then the back/next buttons are pooched and if i browse by b/n alone the captions don't load.
I'm sure there is an easy fix or a better way but like i said - I'm a graphics guy...
Thanks in advance - I know time is precious
I know some one out there will be able to figure this out....it just isn't me.
I'm a graphics guy and my java coding is very limited.
I'm trying to have a gallery with thumbs on the bottom, back and next buttons on top and the pic in the middle.
I have a swap that works nice for the thumbs and an array with back and next functions for the top buttons. I need them to work together or a single script to control all of it....
Ultimately i need the photos and captions to swap from both the thimbs and top buttons, in harmony...HELP!
Heres what i have so far...
[HTML]<script language="JavaS cript" type="text/JavaScript">
<!-- This contros the thumbs... -->
function swapPhoto(photo SRC,theCaption) {
var displayedCaptio n = document.getEle mentById("capti on");
displayedCaptio n.firstChild.no deValue = theCaption;
document.images .imgPhoto.src = "images/realty/" + photoSRC;}
<!-- and for the back/next links... -->
var photos=new Array()
var which=0
photos[0]="images/realty/pic1.jpg"
photos[1]="images/realty/pic2.jpg"
photos[2]="images/realty/pic3.jpg"
photos[3]="images/realty/pic4.jpg"
photos[4]="images/realty/pic5.jpg"
function backward(){
if (which>0){
window.status=' '
which--
document.images .imgPhoto.src=p hotos[which]
}
}
function forward(){
if (which<photos.l ength-1){
which++
document.images .imgPhoto.src=p hotos[which]
}
else window.status=' End of gallery'
}
</script>
<!-- In the body of the html - for the main image... -->
<p><a href="javascrip t:backward()">& lt;<Back</a> - <a href="javascrip t:forward()">Ne xt>></a></p>
<p><img src="images/realty/pic1.jpg" name="imgPhoto" id="imgPhoto" /></p>
<p id="caption">.. .</p>
<!-- and for the thumbs... -->
<a href="javascrip t:swapPhoto ('pic1.jpg','ca ption')"><img src="images/realty/t_pic1.jpg" alt="Thumbnail" width="40" height="40" border="0" /></a>
[/HTML]
Now everything works, but if i browse by thums then the back/next buttons are pooched and if i browse by b/n alone the captions don't load.
I'm sure there is an easy fix or a better way but like i said - I'm a graphics guy...
Thanks in advance - I know time is precious
Comment