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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change Image in Cell With Mouse Over Another Cell 1

Status
Not open for further replies.

GB555

Technical User
May 13, 2003
3
GB
In my web page, I want to be able to change a picture in one cell of a table when the mouse is over another cell in the same table. Please can anyone tell me how to do this?
 
Do you already know how to change images? In other words is your problem specific to images in tables?

-pete
I just can't seem to get back my IntelliSense
 
For cross browser compatibility you can't assign onMouseOver to a table cell.

If you're using dreamweaver, the easiest way is to insert a rollover image which will create all the code you need. Then go into code view and look at the onMouseover for the <a> tag surrounding the image. MM_swapImage takes 3 parameters, the 1st is the name of the image you want to swap, the 2nd is the file that you want to swap to.

If you're not using Dreamweaver or you need something explained, post again.

Marklar

It's not what you know, it's who knows it that counts.
 
Thanks for your posts.

I can change the picture in a cell using mouse over facility in frontpage (which is my editor).

What I want to do is change a picture in one cell of a table when the mouse is over a different cell.

Appreciate your help.

GB
 
That's what I was showing you before. I'll explain again in more detail.

I'm not sure how it works in Frontpage but I'm sure it's pretty much the same as Dreamweaver.

Leave the image that you want to change as a normal image. Then make a rollover image in the cell that you want to cause the change. Make the initial picture a transparent GIF and the rollover image should be the one you want for the other picture.

Now look at the code and you should see that the onMouseOver function has 2 or more parameters. In Dreamweaver this is:
onMouseOver=&quot;MM_swapImage('imageName', 'path/filename.gif', 1)&quot;

All you need to change is the 'imageName' parameter from the name of the blank image to the name of the one you want to change.

Hope this helps
Marklar

It's not what you know, it's who knows it that counts.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top