473,749 Members | 2,432 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Gallery Help?

nritchie124
1 New Member
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;&lt;Back</a> - <a href="javascrip t:forward()">Ne xt&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="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
Dec 3 '06 #1
1 1331
Ganon11
3,652 Recognized Expert Specialist
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: http://www.thescripts. com/forum/forum149.html
Dec 3 '06 #2

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

Similar topics

1
2587
by: Simone Winkler | last post by:
Hello, I don't know if my question is out of topic...so I apologize if I am. I use the coppermine picture gallery for my web (actually I want to use it but the server doesn't seem to have GD running but I will beg them to activate it). How can I actually find out if GD is installed? I tried to use phpinfo() and I searched for a GD entry, but no one was there, so can I be sure, that GD isn't installed? (Because the admins of the...
2
3929
by: matt | last post by:
I have compiled some code, some written by me, some compiled from various sources online, and basically i've got a very simple flat file photo gallery. An upload form, to upload the photos and give them a caption, storing the caption and filename in a text file. It's a bit buggy when removing the photos and captions from the file, and also in displaying them on the delete page. you can see it in action at www.4am.com.au/gallery/upload.php...
1
2915
by: desjardins.daniel | last post by:
Hi ! Excuse my english, i'm a french canadien... So here my message : I have put on my site a photo gallery and at the right a nav menu. This menu has a red dot visible want someone is passing over one item or clickong one item. I want to make two things in this page (the sameone http://www.danieldesjardins.com/gallery/1202015) so it would be like a
11
2778
by: ste | last post by:
Hi there, Further to my recent posts where I've received excellent help from Rik and Jerry, I've ended up with an image gallery on my website that displays images in a table, 3 images per row. This works great and opens all images in the database when I open the url mywebsite/gallery.php, or I can choose certain images (by category) by going to url's like mywebsite/gallery.php?category=landscape Although the above worked perfectly...
11
2094
by: shror | last post by:
hi every body I need help please i have designed an image gallery of about 20 pictures and they are shown in thumb nail views and for viewing the largeer version of the images i have added a radio button and a push button, so that the user choose the picture using the radio button and click on the push button to open the larger version picture in another window, but my problem is that i know how to pass the selection to the second page...
5
2122
by: dabhand | last post by:
Hi This page http://www.dabhand.co.nz/ayupdev/gallery-riders.html works great in IE but not in Firefox... any help would be appreciated. It refers to an external javascript file which I have included the code to below: The file name is imgriders.js - as referred to in source of the html file above. if (document.images) { image1 = new Image; image2 = new Image; image3 = new Image;
9
11115
by: boycey | last post by:
Hi I have tried to embed a simpleviewer gallery (which works fine as a standalone web page) into a table on an existing web page inorder to show it as a gallery window. The gallery loads but there are no images? The working page is at http://www.widbrookgrange.co.uk/widbrookgallery/widgallery.html The non functioning page is at http://www.widbrookgrange.co.uk/galleryembed.htm All the simpleviwer files are in widbrookgallery folder...
25
4142
by: Gilles Ganault | last post by:
Hello I've been googling for a couple of hours, but still haven't found what I need: - really simple PHP-based image gallery software. Ideally, just a single file that I just drop into a directory filled with JPG files - uses eg. GD to generate thumbnails automagically, and saves them into a sub-directory for the next time (I don't want thumbnails to be regenerated every time someone views the pictures) - as an option, supports...
3
7238
by: ishkur88 | last post by:
Hello, I'm a starting out web designer, and a client of mine wants a gallery of their products to be displayed. What I have so far works beautifully. Basically what it does is reads the contents of a directory and displays them in a list. That list is then vertically wrapped to be made into a table type display. Resulting in a basic grid pattern of images. This was great when they only had 20 or so images, but now they have over 50. I...
0
2306
nomad
by: nomad | last post by:
Hello Everyone. I founded an Flash and xml photo gallery. It works but I took it to another step What I want is to have six different galleries in one Flash file. I figure out how to do that but when I click on the the galleries I can see the pervious gallery files. The gallery works like this: When you open the gallery there are links on top of the page where you can go to other gallery; with gallery one which has small thumbnails on...
0
8997
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9568
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9389
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9335
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9256
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6801
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6079
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4881
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2218
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.