Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Showing and Hiding images
Old 11-04-2004, 08:46 PM Showing and Hiding images
Novice Talker

Posts: 6
Trades: 0
Hi

I'm trying to build a photography page which consists of several thumbnails images down one side. I want a full size image to appear in the center when it's thumbnail is clicked. Currently, I have all the fullsize images with visibility:hidden in div containers. The full image becomes visible when the corresponding thumbnail is clicked. The problem is that once an image is made visible, it stays visible. I would like the full images to become hidden once a new thumbnail is clicked. I was hoping not to have to use an iframe to achieve this. ... Thanks in advance.
sandy is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-04-2004, 11:34 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
I'm certain that you can do this, all you need is a little javascript.

I'm working on it right now, but it's not working and my laptop battery is almost dead. I'll post something more tommorow.
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Old 11-05-2004, 02:51 AM
Ultra Talker

Posts: 377
Trades: 0
if your photos have the names of the same type (like "photo1","photo2" etc.) you may do smth like this.

Code:
    var number_of_photos; // number of your photos in document
   
    function HideAll(i) //i - is a number of photo that you need to make visible
   {
      for(int j=0;j<number_of_photos;j++)
      {
             if(j!=i) document.getElementById("photo"+j).style.visibility="hidden";
             else document.getElementById("photo"+j).style.visibility="visible";
      }
   };
It's quite a dumb variant, maybe NateDogg's script would be better
__________________
andrews_john

Please login or register to view this content. Registration is FREE
andrews_john is offline
Reply With Quote
View Public Profile Visit andrews_john's homepage!
 
Old 11-05-2004, 01:51 PM
NateDogg's Avatar
Extreme Talker

Posts: 163
Trades: 0
I was working along the same lines, but I was saving the last picture looked at and hiding only the one but...

Mine still doesn't work, so for the time being... yours is better
__________________
Nathan


Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

Please login or register to view this content. Registration is FREE
NateDogg is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Showing and Hiding images
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.63652 seconds with 12 queries