Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS question

Status
Not open for further replies.

syakovis

Programmer
Joined
Aug 2, 2001
Messages
6
Location
AU
I have the following table structure:

<table>
<tr>
<td class=&quot;classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>NORMAL</td>
<td class=&quot;classSelected&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>SELECTED</td>
</tr>
<tr>
<td class=&quot;classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>XYZ</td>
<td class=&quot;classNormal&quot; onmouseover=&quot;this.className = 'classSelected'&quot; onmouseout=&quot;this.className = 'classNormal'&quot; onMouseMove=&quot;this.className = 'classSelected'&quot;>2</td>
</tr>
</table>

What I want to do is to highlight on cell on load and then I need to deselect it if user moves mouse over other cells in the table. I know I can do it by using onMouseOver event the question is how can I reffer to that specific cell ??? (the one selected onLoad)
 
how do you refer to <td> element with ID via Java Script ???
I know how to refer to form element with ID but this is <td>... any ideas ????
 
hie
giving td an id wuld work in ie only, (nn6) 2 refer:
document.all.tdid
or
document.getElementById(&quot;tdid&quot;) regards, vic
 
Great thanks !!! It works now
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top