Hello and welcome to our community! Is this your first visit?
Register
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
    Posts
    1
    Thanks
    0
    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
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    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';"
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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