/    Sign up×
Community /Pin to ProfileBookmark

Swap Image for another frame

Greetings,

Having trouble with a menu I’ve created in one frame affecting data in another frame. Any help would be wonderful!

Presently have 3 images (buttons) stacked atop eachother. I’d like to have “onClick” the image swap for the selected button, and change the content in the main (other) frame. So far so good … my problem is that when I click another of the menu buttons, the swapped image remains on the first image and adds a swapped image also to the 2nd image – and I need the 1st button to revert back to its original state, and the swapped image to appear for the second button.

How can I make it so that on a click of a different button the first button reverts, and the second button swaps?

Below is the code:

<td width=”73″><a href=”aboutus.htm” TARGET=”main” onClick=”MM_swapImage(‘One’,”,’images/aboutus-B.jpg’,1)”><img src=”images/aboutus-A.jpg” alt=”About Us” name=”One” width=”142″ height=”25″ border=”0″></a><br>
<a href=”courses.htm” TARGET=”main” onClick=”MM_swapImage(‘Two’,”,’images/courses-B.jpg’,1)”><img src=”images/courses-A.jpg” alt=”Courses” name=”Two” width=”142″ height=”23″ border=”0″></a><br>
<a href=”services.htm” TARGET=”main” onClick=”MM_swapImage(‘Three’,”,’images/services-B.jpg’,1)”><img src=”images/services-A.jpg” alt=”Services” name=”Three” width=”142″ height=”25″ border=”0″></a></td>

Thank you,

Melissa N

to post a comment
JavaScript

0Be the first to comment 😎

×

Success!

Help @Melissa_N spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.7,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...