[thelist] MouseOver Table Cells
Don Makoviney
DonM at allensysgroup.com
Fri May 25 11:51:52 CDT 2001
That worked great! Thanks a bunch!
Now, I have to ask. . . .is there any way to make the whole row a link?
I can pull the link dynamically from a DB, but I don't fully understand the
DOM (hey. . .gimme a break, I'm trying. . .)and not sure how that would be
rendered. . . any thoughts?
Thanks,
Don M
-----Original Message-----
From: Joe Crawford [mailto:jcrawford at avencom.com]
Sent: Friday, May 25, 2001 11:21 AM
To: thelist at lists.evolt.org
Subject: Re: [thelist] MouseOver Table Cells
on 5/25/2001 7:40 AM, Don Makoviney at DonM at allensysgroup.com wrote:
> I am mousing over table cells and changing the colors like this in ASP:
>
> Response.Write ("<tr><td style='border-bottom:1px groove gray;cursor:hand'
> onMouseOver=""this.style.backgroundColor='#ffffdd'""
> onMouseOut=""this.style.backgroundColor=''""><b>" & objItem &
> "</b></td><td>" & Request.QueryString(objItem) & "</td></tr>")
>
>
> However, instead of hardcoding these colors in like I have above, I would
> like to specify these colors in a CSS file, but I am having a hard time
> finding the equivalent way to do it there.
You can call this.style.className - then have the class name in your CSS
which the page access (could be on the page, could be in a linked
stylesheet).
<td
onmouseover="this.className='yellowThing';"
onmouseout="this.className='whiteThing';">hello</td>
So you need whiteThing and yellowThing classes:
<style type="text/css">
<!--
.yellowThing {
background: #FF9;
}
.whiteThing {
background: #FFF;
}
//-->
</style>
I have something similar here:
http://www.artlung.com/temp/tr-onmouseover-style.html
But I really need to move it to http://www.artlung.com/lab/ somewhere.
HTH,
Joe
--
Joe Crawford |||||||||||||| mailto:jcrawford at avencom.com
|||||||||||||||||||||||| http://www.avencom.com
||||||||||||||||||||||||||| Avencom: Set Your Sites Higher
---------------------------------------
For unsubscribe and other options, including
the Tip Harvester and archive of TheList go to:
http://lists.evolt.org Workers of the Web, evolt !
More information about the thelist
mailing list