Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Dreamweaver (all versions) section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 10th, 2003, 09:21 AM
Registered User
 
Join Date: Dec 2003
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Complex Disjointed Rollover

Hi!
What I'm trying to achieve is a Complex Disjointed Rollover. A button that
when you rollover it it must change 2 pictures in 2 different tables.

left2 is the name of the id of one of the pics I need to change and upperLeft is the other. The rollover works for the left2 image (the picture changes when you rollover the button) but for upperLeft it does not.



Referring URL : http://62.103.162.94/peifasyn2/index.jsp



 
Old December 10th, 2003, 10:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Yeah, you can do that, but not with Dreamweaver created code.

Here's what I would do.

1. Add on onmouseover attribute to the first image. Have it call the JavaScript function ChangeImage

2. Give your second and third image (the ones that need to change) a unique ID and name attribute.

3. Add the ChangeImage function

4. Add the following code to that function:

document.images["SecondImage"].src = 'NewSource2.gif';
document.images["ThirdImage"].src = 'NewSource3.gif';

Now, when the user hovers over the first image, the second and third image will change into NewSource2 and NewSource3 respectively.

Repeat the process for the onmouseout of the first image, so you can restore the images.

Does that help?


Imar


---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.





Similar Threads
Thread Thread Starter Forum Replies Last Post
make an image rollover that calls an asp page gavmc Classic ASP Basics 0 December 15th, 2005 12:13 PM
Rollover Images bebeard CSS Cascading Style Sheets 2 February 25th, 2005 08:37 AM
Rollover prob in XHTML when Flash inserted socoolbrewster Javascript 4 September 14th, 2004 01:03 PM
Rollout triggered when I rollOver button.... Snib Flash (all versions) 7 September 6th, 2004 01:51 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.