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!

Using DHTML to change the background image of a cell for NS and IE

Status
Not open for further replies.

inta

Technical User
Aug 2, 2001
13
AU
Hello,

I am creating a new site and would like to be able to change the background image of a cell with onmouseover and onmouseout or something similar (can be javascript). I can get it to work with IE but not NS.

I have used javascript to change the foreground image with onmouseover and onmouseout for both browsers but I cannot seem to get it to work with the background image.

sample code

This works for IE

<td background=&quot;image1.jpg&quot; onmouseover=&quot;background='image2.jpg'&quot; onmouseout=&quot;background='image1.jpg'&quot;>

I would very much like a common solution that works with both browsers

I thank you in advance for all the wisdom and assistance in solving my little problem.
 
Which version of both browsers? ===
Supports Mozilla and Web Standards
Knows HTML/XHTML, CSS1, JavaScript, PHP, C++, DOM1
===
 
I wish to support V4 and above for both browsers.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top