Go Back   CodingForums.com > :: Server side development > Other server side languages/ issues > ColdFusion

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 06-07-2011, 08:14 AM   PM User | #1
theborg72
New Coder

 
Join Date: May 2010
Location: Sweden
Posts: 15
Thanks: 1
Thanked 0 Times in 0 Posts
theborg72 is an unknown quantity at this point
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 12:55 PM..
theborg72 is offline   Reply With Quote
Old 06-08-2011, 04:01 PM   PM User | #2
Gjslick
Regular Coder

 
Join Date: Feb 2009
Location: NJ, USA
Posts: 476
Thanks: 2
Thanked 70 Times in 69 Posts
Gjslick will become famous soon enough
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
Gjslick is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:10 AM.


Advertisement
Log in to turn off these ads.