home hardware prices news articles forums photos user reviews
Go Back   Tech Support Forums - TechIMO.com > PC Hardware and Tech > Webmastering and Programming
Ask a Tech Support Question (free)!

Simple HTML Image Changing Question

Reply
Get bargains at  »  Dealighted.com
 
Thread Tools Search this Thread
Currently Active Users: 2620
Discussions: 200,999, Posts: 2,380,002, Members: 246,368
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,177
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)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,581
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,177
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)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,581
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)
ph34r t3h g04t
 
Whir's Avatar
 
Join Date: Oct 2001
Location: Kingsford, MI
Posts: 19,581
Blog Entries: 7
No problem. Post back if you have any problems.
Whir is online now   Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Most Active Discussions
Is It Just Me? (3109)
‘Rogue’ or ‘Rouge’? (8)
Charges against non-tippers dropped.. (22)
Foxconn Blackops x48 MoBo (5)
Nvidia GTX 260 problem (14)
Delete an OS (18)
Laptop with wireless problem. (13)
Wireless Televisions. (12)
CPU fan stops spinning randomly (11)
Regular Build (11)
Point and Shoot Camera Suggestions. (9)
windows vista security holes (19)
[F@H SPAM 11/16/09] ! 1/2 months to.. (41)
windows 7 problem (7)
Recent Discussions
add ram to existing (4)
Computer shutting down on its own (6)
EVGA 9800 gtx help with finding a goo.. (13)
"Documents and Settings" fo.. (7)
Delete an OS (18)
Outputing 1080p from my PC to my 720p.. (0)
panasonic dmr ez48veb recorder (0)
Need help getting speakers to work (2)
Nvidia GTX 260 problem (14)
Laptop with wireless problem. (13)
Point and Shoot Camera Suggestions. (9)
Is the PSU I received dead? (16)
FreeAgent drive software not x64 comp.. (1)
Intel 5100 AGN issues fixed yet? (28)
Foxconn Blackops x48 MoBo (5)
[F@H SPAM 11/16/09] ! 1/2 months to r.. (41)
Print spooler problem (17)
Q9650 vs. Q9550 (2)
Desktop Calendar Application (2)
Looking for new motherboard (1)
soundmon.exe (8)
Jedi Academy Problem (3)
Can a page file be "too big".. (1)
Size after cutting 700Mb file is 2.5 .. (0)
windows vista security holes (19)


All times are GMT -4. The time now is 02:07 PM.
TechIMO Copyright 2009 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