This is a discussion on "OnMouseOver Action" within the JavaScript Forum section. This forum, and the thread "OnMouseOver Action are both part of the Program Your Website category.
|
|
|
|
|
![]() |
||
OnMouseOver Action
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
OnMouseOver Action
I have put an action onmouseover in one of my colunm in a row...
When you mouseover on the cell, the bg color will turn to blue... What I want to add when I mouseover the cell the color will turn blue and the border color will be black as well... <td bgcolor="#FFFFFF"onmouseout="this.style.background Color='#FFFFFF'" onmouseover="this.style.backgroundColor='#CEDFED'; this.style.cursor='hand'" bordercolor="#FFFFFF"> Text </td> ~On mouseOver, set border color to Black~
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|
|
|||
|
See if this works.
|
|
||||
|
Why not use the :hover selector in CSS??
Always try and use latest standards where possible... Using the :hover selector is the recommended way of doing what you are doing. Steer clear from javascript, and if need be, for IE compliance, use the IE7 Patch
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
||||
|
but isn't hover only available for A tags?
and even then, don't u need sum sort of JS to make it work in other elements?
Last Blog Entry: Random String in Javascript (Apr 21st, 2008)
|
|
|||
|
Thanx guys...it works!
I thing using this method is more simple that CSS. Simple and short!
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
s'OK if you like to assume that all browsers have Javascript enabled...
|
|
||||
|
<blockquote id="quote" class="ffs">quote:<hr height="1" noshade="noshade" id="quote" />s'OK if you like to assume that all browsers have Javascript enabled...<hr height="1" noshade="noshade" id="quote" /></blockquote id="quote">Thats why I said to go down the CSS route. That way, only IE gets the javascript (From the IE7 fix)
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
|||
|
for the css try this, put this in your <head> tags:
|
|
|||
|
Yeah...thats nice...
Thanx da_stimulator
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
|
|||
|
Please excuse my ignorance, but as a novice to writing code etc. how do we get the snitz forum to change cell colours on moving the mouse over, and have a hand link to topic.. I have a snitz forum ( http://216.119.70.15/forum/default.asp ) on my village website www.lynehamvillage.com , and would like to smarten up the view up like the one here.. Any help would be greatly appreciated. Is there a way to have alternate colours like this site..
Many thanks andy happy new year too. |
![]() |
| Tags |
| onmouseover, action |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| popup div onmouseover | pesho318i | JavaScript Forum | 2 | Dec 28th, 2007 13:30 |
| onmouseover not working in ff | dab42pat | JavaScript Forum | 4 | Nov 30th, 2007 14:10 |
| how to change button action into a movieclip button action | cjrollo | Flash & Multimedia Forum | 7 | Nov 21st, 2007 17:07 |
| onMouseOver Help | Bighen | JavaScript Forum | 3 | Jan 24th, 2006 20:17 |
| OnMouseOver | kookie09 | JavaScript Forum | 5 | Apr 21st, 2005 23:20 |