PDA

View Full Version : TR rollover to change class type!!


NinjaTurtle
02-20-2003, 09:04 AM
dear,

how to change CSS class type when mouse rollover to TR(Not TD, i can do with TD but TR cannot!!)

i do this, but its not workable:

<tr onmouseover="className='bluetd';" onmouseout="className='bodytd';" onClick="document.form2.CustID.value=document.form2.CustID1 value;document.form2.submit()">
<td class="bodyTD"><%=counter%>.</td>
<td class="bodytd"><%=rsfname%></td>
<td class="bodyTD"><%=rscustID%></td>
<td class="bodyTD"><%=rscustcode%></td>
<td class="bodyTD"><%=salesman%></td>
<td class="bodyTD"><%=statedesc%></td>
<td class="bodyTD"><%=rsglcode%></td>
</tr>

meow
02-20-2003, 09:51 AM
Skip the classes in the TDs. They override the class you set in TR.

Shouldn't it be 'this.className'? Well, I'm no javascripter so I don't know about that. :p

brothercake
02-20-2003, 11:59 AM
Originally posted by meow
Shouldn't it be 'this.className'?

yes, it should

pb&j
02-20-2003, 02:19 PM
Originally posted by meow
Skip the classes in the TDs. They override the class you set in TR.

The TD ones override the TR? Wouldn't it "add on" and only override items if the same tag or effect was specified.

meow
02-20-2003, 09:25 PM
I assumed they concerned the same 'effect' since you use bodytd in the actual rollover too?

If you have
.bluetd { background: blue }
.bodytd { background: yellow }

the yellow background in the cells will 'win' over a blue background set in a rue for TR. Same as it worked in plain vanilla HTML btw. :)