|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member (4 bit)
Join Date: Apr 2002
Posts: 10
|
Javascript problem - changing picture
I am coding a web page and have a problem with a graphical rollover. I have two images (I'll call them Image1 and Image2). When the mouse goes onto Image1, it changes to Image2, and when the mouse moves off, it reverts back to Image1. I know I have to write something like
onmouseover=MM_SwapImage"Image1" onmouseout=ImgRestore"Image1" I want to know how what code to write to do this. |
|
|
|
|
|
#2 |
|
Member (10 bit)
|
You want a JavaScript rollover I have attached a txt file which gives the code you need - you just need to change the file paths to the images and the image names for it to work. Also has code to preload the rollover image so it is available as soon as someone moves the mouse over the image.
HTH. DJ |
|
|
|
|
|
#3 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
I usually create a funtion in the header of the page like in the attached file.
By using a function, you can call it for multiple images.
__________________
Want to Make $$$$ with your Computer? No Risk! Simply press shift-4 four times in a row |
|
|
|
|
|
#4 |
|
Staff
Premium Member
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
|
Now see that is the problem with Dreamweaver. It overcodes.
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|