Advertisement

01.16.2008 at 12:49PM PST, ID: 23088349
[x]
Attachment Details

Onclick Swap Image and href behavior

Asked by joibrooks in Dynamic HTML (DHTML), Web Languages/Standards, JavaScript

Tags: HTML, DHTML, Javascript, all browsers

Hello Experts! I'm trying to keep my code simple. I'm trying to create a swap image behavior.

Onclick a thumbnail on a web page displays a larger image on the same page. There are 14 thumbnails. Each time the swap image behavior displays the larger image on the same page, I want each larger image to be  linked to another page. So, the thumbnail gets clicked, the larger image is displayed, and that image is linked to another page.

I've got this first swap image behavior down as:
<img src="images/Thumb5.png" width="75" height="75" onclick="document.pic1.src='images/baboon.jpg'" alt="Baboon"/>

which swaps out:

<img src="images/King.jpg" name="pic1" width="490" height="400" alt="" />

Now, I'd like the baboon.jpg to be linked to a page named baboon.html. All 14 thumbnails have a larger picture and then an html page. I want to avoid popups.

Your recommendations are greatly appreciated.

-jbStart Free Trial
[+][-]01.16.2008 at 01:31PM PST, ID: 20676380

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]01.16.2008 at 01:35PM PST, ID: 20676426

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Dynamic HTML (DHTML), Web Languages/Standards, JavaScript
Tags: HTML, DHTML, Javascript, all browsers
Sign Up Now!
Solution Provided By: Zvonko
Participating Experts: 1
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628