Re: bgcolor from a 'this'
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.javascript archive

Re: bgcolor from a 'this'

From: Randy Webb <HikksNotAtHome@aol.com>
Date: Mon Jul 11 2005 - 19:00:57 CEST

RobG wrote:
> Mick White wrote:
>
>> @sh wrote:
>>
>>> Trying to do this, but its not working...?! My aim being to change
>>> the bgcolor of the cell upon which the user has rolled over, I'll
>>> then replicate this as an OnMouseOut to change it back.
>>>
>>> -----------------------------
>>> <script language="JavaScript">
>>> <!--
>>> function Ash_TopNavRollovers(TheObject); {
>>> TheObject.bgcolor="#000099;";
>>> }
>>> -->
>>> </script>
>>> -----------------------------
>
>
> Seeing as 'A' is the *only* element that IE allows CSS 'hover' on (and
> even then it must have a href attribute), why not use that? No JS
> required at all.

Maybe it's because nobody has answered the original question? The
question was to be able to change the background color of a table cell
that a user mouse's over. The problem lies in the fact that the A tag is
being used when it should be the TD's onmouseover/out that is being
used. If the table cell is wider than the link is, the problem becomes
very apparent :)

-- 
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Received on Tue Oct 18 02:54:23 2005