Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
05-01-2006, 11:27 PM #1
- Join Date
- May 2006
- Thanked 0 Times in 0 Posts
Changing the background color of a table cell onFocus
I've an application I wrote months ago that generates html files mostly
containing tables with thousands of cells. Each table cell contains a uniquely
named anchor and a third-party application calls the browser with the
html file name and specified anchor. like file:///C:/perl_apps/HTML.htm#BX45222.
Each cell begins like this
<td onblur="bgColor='lightgrey';" bgcolor="lightgrey" onfocus="bgColor='lightgreen';">
In the past this work as planned with the cell of interest highlighted in lightgreen. Now
this no longer works with Firefox. It still renders appropriately with Internet
Explorer. If there's an portable way to turn the back ground color of a cell
a different color by referencing a document anchor I'd like to know.
05-02-2006, 01:24 AM #2
- Join Date
- Dec 2004
- In a place far, far away...
- Thanked 1,043 Times in 1,019 Posts
It doesn't work in firefox because its not the correct JS for background color
Code:onfocus="this.style.backgroundColor = 'lightgreen';" onblur="this.style.backgroundColor = 'lightgrey';"