By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,779 Members | 1,111 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,779 IT Pros & Developers. It's quick & easy.

Gallery Help?

P: 1
Hi there....
I know some one out there will be able to figure this 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="JavaScript" type="text/JavaScript">
<!-- This contros the thumbs... -->
function swapPhoto(photoSRC,theCaption) {
var displayedCaption = document.getElementById("caption");
displayedCaption.firstChild.nodeValue = theCaption;
document.images.imgPhoto.src = "images/realty/" + photoSRC;}
<!-- and for the back/next links... -->
var photos=new Array()
var which=0
function backward(){
if (which>0){
function forward(){
if (which<photos.length-1){
else window.status='End of gallery'
<!-- In the body of the html - for the main image... -->
<p><a href="javascript:backward()">&lt;&lt;Back</a> - <a href="javascript:forward()">Next&gt;&gt;</a></p>
<p><img src="images/realty/pic1.jpg" name="imgPhoto" id="imgPhoto" /></p>
<p id="caption">...</p>
<!-- and for the thumbs... -->
<a href="javascript:swapPhoto ('pic1.jpg','caption')"><img src="images/realty/t_pic1.jpg" alt="Thumbnail" width="40" height="40" border="0" /></a>

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
Dec 3 '06 #1
Share this Question
Share on Google+
1 Reply

Expert 2.5K+
P: 3,652
Sorry to disappoint, but it looks like you need some help in javascript - this is the Java forum. Java and Javascript are two completely different things.

Try here:
Dec 3 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.