home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Join TechIMO for Free!
Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
Reply Get bargains at  »  Dealighted.com
 
Thread Tools
Currently Active Users: 1896
Discussions: 188,398, Posts: 2,243,591, Members: 232,627
Old November 3rd, 2004, 08:13 PM   Digg it!   #1 (permalink)
Member
 
Join Date: Oct 2003
Location: Calgary, Alberta
Posts: 48
Simple HTML Image Changing Question

Hey hey,

This is probably a rather basic question for most of you, but please enlighten me. I'm trying to set up a sitatuon, where there is a main image, with small thumbnails to the side of the main image....and when the user clicks on the small thumbnails, the main image changes to whatever the thumbnail picture is. Something similar to what is setup on techimo under the galleries.

Thank you for any suggestions or help!

Jin

jinsta is offline   Reply With Quote
Old November 3rd, 2004, 08:37 PM     #2 (permalink)
Ultimate Member
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: Pasadena, CA
Posts: 2,152
You can attain this same effect using very basic HTML frames. If you check out http://www.w3schools.com it will explain the frameset HTML tag.

There are, of course, more advanced ways to do it using scripting and such but Im guessing for your purposes its not really necessary. Of course if you want to learn let us know!
__________________
YAH! I knew you'd be jealous

Tekk is offline   Reply With Quote
Old November 3rd, 2004, 09:03 PM     #3 (permalink)
Member
 
Join Date: Oct 2003
Location: Calgary, Alberta
Posts: 48
i looked through the frames section of that site, as well as the images section...all under the HTML area...i couldn't find anything related to what i want to do

jinsta is offline   Reply With Quote
Old November 3rd, 2004, 09:07 PM     #4 (permalink)
Kawaru wa yo!
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 16,137
Blog Entries: 7
You could also do it with a simple Javascript script.
Whir is online now   Reply With Quote
Old November 3rd, 2004, 09:23 PM     #5 (permalink)
Member
 
Join Date: Oct 2003
Location: Calgary, Alberta
Posts: 48
Yeah i probably can do it with Javascript...but i'm not knowledgeable in how to write javascript....thats why i'm asking for help.
jinsta is offline   Reply With Quote
Old November 3rd, 2004, 09:25 PM     #6 (permalink)
Ultimate Member
 
Tekk's Avatar
 
Join Date: Oct 2001
Location: Pasadena, CA
Posts: 2,152
Quote:
Originally Posted by jinsta
i looked through the frames section of that site, as well as the images section...all under the HTML area...i couldn't find anything related to what i want to do
It wont exactly tell you how to create the page you want but it will give you the necessary information. Basically what you want is one frame of the window to contain all the image thumbs while the main portion of the window will contain the full size image. Clicking on the thumbnail will update the main frame.

To utilize a simple frameset to do this you would need to create three different HTML pages. One that contains the image thumbnails, and then another that will contain some filler information. The third HTML page will contain the frameset tags that define how the frames will be set up.
Tekk is offline   Reply With Quote
Old November 3rd, 2004, 09:30 PM     #7 (permalink)
Newbie
 
filipino's Avatar
 
Join Date: May 2004
Location: Philippines
Posts: 3,894
neither a frame or SSI (server side includes)
go here for SSI info http://www.carleton.ca/~dmcfet/html/ssi.html
__________________
I miss Dimebag Darrell
filipino is offline   Reply With Quote
Old November 3rd, 2004, 10:06 PM     #8 (permalink)
Kawaru wa yo!
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 16,137
Blog Entries: 7
Make your layout, and then add this code.

Code:
In the <head> section, put:

<script type="text/javascript">
  function changeMe(p)
  {
    document.images.change.src=p;
  }
</script>


Then your main image tag should look something like this:

<img name="change" src="starting_image.jpg">

Then in each of the thumbnails, you want the add the function call, so that would look like this:

<img src="this_pic.jpg" onclick="changeMe('this_pic.jpg')">
Does that make any sense, or no? Obviously you'll replace "this_pic.jpg" with the whateve the filename is, including the path if necessary.
Whir is online now   Reply With Quote
Old November 3rd, 2004, 11:30 PM     #9 (permalink)
Member
 
Join Date: Oct 2003
Location: Calgary, Alberta
Posts: 48
yeah it does, thanks alot whir!
jinsta is offline   Reply With Quote
Old November 3rd, 2004, 11:40 PM     #10 (permalink)
Kawaru wa yo!
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 16,137
Blog Entries: 7
No problem. Post back if you have any problems.
Whir is online now   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Black and white in Photoshop 4 ashtin Graphic Design and Digital Photography 6 October 10th, 2004 10:10 PM
camera lenses cracked General Tech Discussion 13 December 20th, 2003 02:36 PM
why dont it work? Shifter2101 IMO Community 12 December 11th, 2003 04:34 AM
A problem with puting a .gif file on the web Argon88 Graphic Design and Digital Photography 28 November 20th, 2003 10:40 PM
Problem with Saving JPG's with MSPaint. peterstevans Technical Support 45 December 27th, 2002 09:58 PM

Most Active Discussions
Is It Just Me? (2904)
Unarmed man on his stomach shot by .. (6)
3-days in and no threads about Gaza (161)
New Build ( Finally ) (6)
CPU wont boot (7)
Building a gaming computer advice (5)
I think I just killed my computer w.. (24)
Folderchat Weekday thread (444)
Upgrading RAM (6)
Recent Discussions
Left 4 Dead Small Freezes (3)
RCA 52Inch HDTV wont turn on (4)
wishin i could edit my aol prof.. (0)
For cheap price and good qualit.. (0)
Sporadic internet connectivity (2)
Assassins Creed PC Problems (40)
I think my PSU is dieing (1)
building a gaming computer, inp.. (0)
Iming and surfing slowed down (3)
Blackberry Storm, Gears of War .. (1)
Core 2 Quad Q9550 system (3)
COWBOOM Ripoff! Used Laptop w/$.. (4)


All times are GMT -4. The time now is 03:17 AM.
TechIMO Copyright 2008 All Enthusiast, Inc.



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28