Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    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';">
    <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

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    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
    onfocus="this.style.backgroundColor = 'lightgreen';" onblur="this.style.backgroundColor = 'lightgrey';"


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts