473,565 Members | 2,770 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Image gallery - newbie

3 New Member
Hi,

I have an image gallery created with a table. I would like it to highligt the border around the image that is focused on, and also at the same time display a buttonimage above the image for saving the image inside the div. (Like imagesearch on askx.com). I can do this for a single image by using it's "id" but how do I do this with multiple images? And how will I hide/show the specific savebutton for each image?

Example:
<table border="0" id="pictable">
<tr><td><div class="selected pic"this.style. borderColor='bl ue';" onmouseout="thi s.style.borderC olor='white';"> <img src="savebutton .gif"/><br /><img src="image1.jpg "/></div></td>
<td>image2</td><td>image3</td><td>image4</td>........</tr></table>
and so on... you get the idea.

Thank you for your time!
Mar 20 '07 #1
3 1091
acoder
16,027 Recognized Expert Moderator MVP
Welcome to TSDN.

Use the visibility property. Set it to 'visible' to show and 'hidden' to hide.
Expand|Select|Wrap|Line Numbers
  1. document.getElementById(id).style.visibility='visible'
Mar 20 '07 #2
homerzzz
3 New Member
Welcome to TSDN.

Use the visibility property. Set it to 'visible' to show and 'hidden' to hide.
Expand|Select|Wrap|Line Numbers
  1. document.getElementById(id).style.visibility='visible'
Thanks!

But the problem is that I have one button per image. That means that I cannot reuse the same Id on them. I dont want to write 700 scripts if my gallery contains 700 images. How do I make a general script for the whole gallery? Thanks again.
Mar 20 '07 #3
acoder
16,027 Recognized Expert Moderator MVP
Just pass the id to a function with "id" as the argument/parameter name. Then you can use the generalised id to set the visibility for any image.
Expand|Select|Wrap|Line Numbers
  1. function show(id) {
  2. document.getElementById(id).style.visibility='visible';
  3. }
Mar 20 '07 #4

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

Similar topics

0
502
by: Perttu Pulkkinen | last post by:
Does anybody know a php-based image gallery, where final looks of the actual site would not be determined by the application? I mean that there would only be a php-library of objects/functions that could be used to incorporate folders and images to any kind of website with personal appearance. (Of course administration application should be...
8
4796
by: Chris Dewin | last post by:
Hi. I run a website for my band, and the other guys want an image gallery. I'm thinking it would be nice and easy, if we could just upload a jpg into a dir called "gallery/". When the client clicks the "gallery" link, a cgi script could search the gallery/ dir, and create thumbnails of any jpeg images that don't already have a thumbnail...
14
2769
by: Rudy | last post by:
Hello all! I been trying to get a handle with Images. I have learned alot from the fine people here. So, I also learned that thumbnail images look terrible taken from a digital cam. I know why they look bad. So what is the best way to resize an image. I'm not too concerned about size, but I guess I would like to compress it on the upload. ...
10
2224
by: ste | last post by:
Hi there, I'm trying to query a MySQL database (containing image data) and to output the results in a HTML table of 3 columns wide (and however many rows it takes) in order to create a basic thumbnail gallery. I can query and output the data as a single column table, but I'm having problems filling up a 3 column table (with different...
4
1787
by: RE Kochanski | last post by:
I have attempted to use the CSS techniques from two or three sites to create a CSS only image gallery. I am muddling the affair by placing the thumbnails in one float, the page text in another float, then using absolute positioning (and z-index) to display the image over the second float. The CSS for the thumbnails is from "Web...
1
2291
by: gescom | last post by:
My goal is to create essentially two galleries on a single page, in which the first gallery determines what the second gallery displays. For instance, the first gallery refers to the contents of the main image folder. The second gallery would be a folder inside the main image folder. Depending on which image is displayed, the first gallery's...
0
4189
by: numbnutz | last post by:
Hi, I am currently working on an XML Gallery for my girlfriend's brother who is a photographer. I have created a flash front end template and am using an XML database to load the images and accompanying captions. The gallery has more than one image and the user can navigate the gallery by clicking forward and backward buttons to take then...
5
2106
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...
10
6744
by: cjparis | last post by:
Hello everyone. If anyone can give me a hand I would be gratefull Am doing a site which requires a moving element and have used DHTML to do it. Have a simple Browser detect script to sort IE from Netscape. IE is ok but the Netscape browser including Firefox and Safari are not working now. Not sure why. The idea is that when you mouseover...
0
7666
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...
0
7888
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. ...
0
8108
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...
0
7951
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...
0
6260
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5484
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...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1201
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
925
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...

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.