Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Image swap

Status
Not open for further replies.

simonekw

Programmer
Nov 27, 2002
9
GB
I want to to be able to click on a text link that will change some images on my page using dreamweaver mx2004. Any ideas how I could do this?
 
Chris

Could you let me know what javascript I need and where to put it I'm quite new to using code.

Thanks

Simone
 
Sorry I don't think I explained it very well. I have used the behaviours but this only changes the the image that I have set it on. I have a button which when clicked I want it to change some images above it rather than just changing the button.
 
Still using behaviours
[ul]
[li]Select the item you want to be the "button"[/li]
[li]Choose the behavior, in this case "Swap Image" and set the event to "onClick".[/li]
[li]In the dialog box, you should see a list of all named elements on your page. Choose the element on the page that you wish to change when you click the button. This is why the element must have a name. You can give the element a name by selecting it and typing a name in the properties pallete, just next to the thumbnail of the image[/li]
[li]In the dialog box fill in the path of image you want to swap it to.[/li]
[/ul]

You can select the behaviour as many times as you want and choose a different element each time. This lets you make muliple images change just by clicking one button.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top