...

View Full Version : Changing the background color of a table cell onFocus



Packet Dropped
05-01-2006, 11:27 PM
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';">
<a name="BX45222."></a>

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.


TIA, PD

_Aerospace_Eng_
05-02-2006, 01:24 AM
It doesn't work in firefox because its not the correct JS for background color

onfocus="this.style.backgroundColor = 'lightgreen';" onblur="this.style.backgroundColor = 'lightgrey';"



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum