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 Coder
    Join Date
    May 2010
    Location
    Sweden
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    onmouseover repeate table

    Hello..

    hello, trying to create an effect with onmouseover and can not make it work right

    the play code is

    <cfoutput query="rsTest">
    <table width="300" border="0" cellspacing="1" cellpadding="0" >
    <tr style="background-color:###IIF(CurrentRow MOD 2, DE("99FFFF"), DE("9999FF"))#" >
    <td>#rsTest.Betyg#</td>
    </tr>
    </table>
    </cfoutput>
    </body>
    </html>

    find it..
    Last edited by theborg72; 06-07-2011 at 01:55 PM.

  • #2
    Regular Coder
    Join Date
    Feb 2009
    Location
    NJ, USA
    Posts
    476
    Thanks
    2
    Thanked 70 Times in 69 Posts
    Your code right now would just create the table with "alternating" colors. Would have no mouse effect...

    You need to use JavaScript to create a mouseover effect. Try something like this:
    Code:
    <cfoutput query="rsTest">
      <table width="300" border="0" cellspacing="1" cellpadding="0">
        <tr style="background-color: ##99FFFF;" onmouseover="this.style.backgroundColor = '##9999FF';" onmouseout="this.style.backgroundColor = '##99FFFF';">
          <td>#rsTest.Betyg#</td>
        </tr>
      </table>
    </cfoutput>
    -Greg


  •  

    Posting Permissions

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