onclick and onmouseover highlight row

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

onclick and onmouseover highlight row

Post 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
User avatar
anjanesh
DevNet Resident
Posts: 1679
Joined: Sat Dec 06, 2003 9:52 pm
Location: Mumbai, India

Post 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;);
 }
valen53
Forum Contributor
Posts: 137
Joined: Tue Aug 27, 2002 9:29 am

Post by valen53 »

thanks for reply

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