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

OnMouseOut problem

Status
Not open for further replies.

fallingrock

Technical User
Apr 21, 2003
19
US
My navbar is composed with table cells. The following script within a TD tag highlights the cell when you pass over it with the mouse:

onMouseOver="this.bgColor='#FFFFFF'"
onMouseOut="this.bgColor='transparent'"

Works fine in IE 6. But in all versions of Netascape 4-7, when you mouse out, it leaves a blue background color instead of showing the underlying body transparently.

Any clues on how to fix this Netscape problem?

Thanks
 
I suspect that the problem lies with the 'transparent' color attribute. Note that in the onMouseOver function the attribute it a hex representation of a color (in this case, white). I believe that netscape will require a hex value for the onMouseOut event also. I don't think there is a hex value for 'transparent' so you'll have to find a workaround color.

There's always a better way...
 
You are close. I stumbled on the solution, which involves leaving the value undefined. Thus,

onMouseOut "this.bgColor=''"

works fine. In both Netscape 7 and Explorer 6 the code is read as "return no cell color," which is what I wanted.

Thanks all.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top