HTML & WEB-Design

Moderators: Jonathan
Number of threads: 1249
Number of posts: 3348

This Forum Only
Post New Thread
Single Post View       Linear View       Threaded View      f

Report
Cell background color change Posted by OxyzN on 5 Jul 2003 at 1:07 PM
I want to change the color of a table cell whenever the mouse pointer is over it. How can I do it?
Report
Re: Cell background color change Posted by slicer69 on 5 Jul 2003 at 1:18 PM
I think you would have to do something like this:

<table name=mytable>
<Tr>
<td name=mycell onMouseOver="Change_Colour()">
</td>
</tr>
</table>


Then have a JavaScript function in the HEAD that looks a bit
like this:

function Change_Colour()
{
document.mytable.mycell.bgcolor = red;
}

Hope this helps.


I want to change the color of a table cell whenever the mouse pointer is over it. How can I do it?
:

Report
Re: Cell background color change Posted by OxyzN on 5 Jul 2003 at 6:12 PM
: I think you would have to do something like this:
:
: <table name=mytable>
: <Tr>
: <td name=mycell onMouseOver="Change_Colour()">
: </td>
: </tr>
: </table>
:
:
: Then have a JavaScript function in the HEAD that looks a bit
: like this:
:
: function Change_Colour()
: {
: document.mytable.mycell.bgcolor = red;
: }
:
: Hope this helps.
:
:
: I want to change the color of a table cell whenever the mouse pointer is over it. How can I do it?
: :
:
:
Thanks a lot!!!
Report
Re: Cell background color change Posted by Apotheosis on 10 Jul 2003 at 2:42 PM
This message was edited by Apotheosis at 2003-7-10 14:42:40

: I want to change the color of a table cell whenever the mouse pointer is over it. How can I do it?
:
<TD align=center valign=top  onmouseout="this.style.backgroundColor=''"
onmouseover="this.style.backgroundColor='#FFFFFF'">blah</TD>






 

Recent Jobs

Official Programmer's Heaven Blogs
Web Hosting | Browser and Social Games | Gadgets

Popular resources on Programmersheaven.com
Assembly | Basic | C | C# | C++ | Delphi | Flash | Java | JavaScript | Pascal | Perl | PHP | Python | Ruby | Visual Basic
© Copyright 2011 Programmersheaven.com - All rights reserved.
Reproduction in whole or in part, in any form or medium without express written permission is prohibited.
Violators of this policy may be subject to legal action. Please read our Terms Of Use and Privacy Statement for more information.
Operated by CommunityHeaven, a BootstrapLabs company.