OnMouseOver Action

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.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Program Your Website > JavaScript Forum

Notices




Closed Thread
 
LinkBack Thread Tools
  #1  
Old Oct 24th, 2004, 03:24
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!

  #2  
Old Oct 24th, 2004, 05:47
Junior Member
Join Date: Oct 2004
Location: USA
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
See if this works.
Code: Select all
<td bgcolor="#FFFFFF"onmouseout="this.style.backgroundColor='#FFFFFF'" onmouseover="this.style.backgroundColor='#CEDFED';
this.style.cursor='hand'; this.style.border='thin solid #000000'" bordercolor="#FFFFFF">
Text
</td>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #3  
Old Oct 24th, 2004, 09:15
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,186
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
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
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #4  
Old Oct 24th, 2004, 09:35
spinal007's Avatar
Moderator
Join Date: Mar 2004
Location: Good Ol'London
Age: 23
Posts: 1,669
Blog Entries: 1
Thanks: 1
Thanked 4 Times in 4 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #5  
Old Oct 24th, 2004, 12:02
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
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)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #6  
Old Oct 24th, 2004, 19:38
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
s'OK if you like to assume that all browsers have Javascript enabled...
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #7  
Old Oct 24th, 2004, 20:50
Rob's Avatar
Rob Rob is offline
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,186
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
<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)
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #8  
Old Oct 25th, 2004, 01:18
Junior Member
Join Date: Oct 2004
Location: USA
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
for the css try this, put this in your <head> tags:
Code: Select all
<style type="text/css">
td.rowchange:hover {
  bgcolor: #CEDFED;
  bordercolor: #000000;
  border: thin solid #000000;
}
</style>
and this in your table
Code: Select all
<td class="rowchange" bgcolor="#FFFFFF">stuff</td>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #9  
Old Oct 28th, 2004, 04:24
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Yeah...thats nice...
Thanx da_stimulator
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #10  
Old Dec 29th, 2004, 19:10
Junior Member
Join Date: Dec 2004
Location: Lyneham, Wiltshire
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
  #11  
Old Dec 30th, 2004, 10:19
Anonymous User
Guest
Posts: n/a
nice little site mate
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Closed Thread

Tags
onmouseover, action

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

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


All times are GMT. The time now is 03:33.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42