|
|
|
|
![]() ![]() |
Mar 21 2006, 12:36 AM
Post
#1
|
|
|
Member [ Level 2 ] Group: Members Posts: 53 Joined: 20-March 06 Member No.: 12,139 |
Notice from szupie:
stun ur visitors with changing table colors! QUOTE change table rows or table cells bgcolor when mouse moves over elements of the table. (works on IE only). QUOTE paste the following code into the table element that you want to change. for example, if you want to change the table row you paste the code into the <TR>. if you want to change a table cell color you paste the code on the <TD>. you may even add it to the <TABLE> tag to highlight the entire table! Code: QUOTE onMouseover="this.bgColor='lightgrey'" onMouseout="this.bgColor='#FFFFFF'" give different colors as u want! njoy! shiv |
|
|
|
Mar 21 2006, 03:20 AM
Post
#2
|
|
|
'Prentice de-Zighner Group: Members Posts: 368 Joined: 23-January 05 From: USA Member No.: 2,290 |
Interesting piece of code...though i don't think it relates to Javascript at all sorry. It is basically another attribute under the <tr> tag with a little twist in it. It would be good for creating links though, to give it a contrasting color when you hover over it. How many browsers does it cover? Or does it only work with IE and FireFox?
|
|
|
|
Mar 21 2006, 03:33 AM
Post
#3
|
|
|
Techno-Necromancer Group: Members Posts: 1,018 Joined: 13-January 05 From: The Net Member No.: 2,127 |
Actually, it is javascript realted as the onevent triggers are all javascript. It may only be compatible with IE and Firefox because IE defined the background color of an object to be bgColor and to be a part of the element. I haven;t tried this out, but theoretically, to give these effects to anyobject, replace
CODE this.bgColor = "foo"; where foo is either the color name (one of the sixteen html defined presets) or the hex color code preceeded by the # sign with the following CODE this.style.backgroundColor = "foo"; where foo is the same as above.~Viz |
|
|
|
Mar 21 2006, 09:11 AM
Post
#4
|
|
|
Member [ Level 1 ] Group: Members Posts: 35 Joined: 20-March 06 From: Karachi Member No.: 12,138 |
Nice one
But I have heard that this is only limited to Internet Explorer. I dont think that it will work with other Browsers as Firefox, Netscape Navigator etc Anyone ??? who know that it also works on Firefox ?? Regards: Samya Khalid |
|
|
|
Mar 21 2006, 09:20 AM
Post
#5
|
|
|
Member [ Level 1 ] Group: Members Posts: 42 Joined: 17-March 06 From: Russia, St.Petersburg Member No.: 12,058 |
I don't think such a simple function may be restricted)
|
|
|
|
Mar 21 2006, 09:24 AM
Post
#6
|
|
|
Nenad Bozidarevic Group: [MODERATOR] Posts: 1,002 Joined: 7-November 05 From: Belgrade, Serbia Member No.: 9,500 |
I used this on a small presentation of mine, really neat function. You can see it at www.final-desgin.net, the right vertical menu. Take a look at the source code and you'll see how it is used.
|
|
|
|
Mar 21 2006, 03:36 PM
Post
#7
|
|
|
Member [ Level 2 ] Group: Members Posts: 53 Joined: 20-March 06 Member No.: 12,139 |
I used this on a small presentation of mine, really neat function. You can see it at www.final-desgin.net, the right vertical menu. Take a look at the source code and you'll see how it is used. hey pyost real glad to know it was straight away useful to someone! cheerz! shiv |
|
|
|
Mar 21 2006, 09:49 PM
Post
#8
|
|
|
Newbie [ Level 2 ] Group: Members Posts: 12 Joined: 16-February 06 Member No.: 11,335 |
But I have heard that this is only limited to Internet Explorer. I dont think that it will work with other Browsers as Firefox, Netscape Navigator etc Anyone ??? who know that it also works on Firefox ?? Regards: Samya Khalid It works on the lastest version of Opera, Firefox, and IE. The style property was implemented in all DOM compliant browsers (as in getElementById["id"].style....) |
|
|
|
Sep 29 2007, 10:40 PM
Post
#9
|
|
|
Newbie [ Level 1 ] Group: Members Posts: 0 Joined: 1-November 07 Member No.: 25,869 |
The following does work in Firefox (ver to.0.0.7)
onMouseover="this.style.backgroundColor='#ffffff'" onMouseout="this.style.backgroundColor='#ff0000'" Cheers & thanks for that! -Alioop |
|
|
|
![]() ![]() |
Similar Topics
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 8th September 2008 - 05:50 AM |