Page 1 of 1

onclick and onmouseover highlight row

Posted: Thu Jun 02, 2005 1:44 am
by valen53
hi all,

i want onclick or onmouseover highlight row like phpmyadmin. But i want onclick first row then highlighted, after that onclick second row then highlighted but first row will not highlighted. At the same time i still can mouseover row for highlight.

any source can provide me?

thanks

Posted: Thu Jun 02, 2005 2:31 am
by anjanesh
Something like this :

Code: Select all

<td onmouseover=&quote;highlight(this,'on')&quote; onmouseout()=&quote;highlight(this,'off')&quote;>Row1</td>

function highlight(srcObj,Flag)
 {
        srcObj.style.backgroundColor = (Flag == 'on'?&quote;#000000&quote;:&quote;#ffffff&quote;);
 }

Posted: Thu Jun 02, 2005 2:52 am
by valen53
thanks for reply

but that 1 only for mouseover, i want mouseover and clicked.