Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
  #1  
Old August 19th, 2004, 10:45 PM
Wedgetail Wedgetail is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2004
Posts: 1 Wedgetail User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Question CSS and Javascript for navigation Table

Can some please tell me what I am doing wrong.

I am trying to create a navigation table on the left of the screen using a table.

I have positioned the table using CSS in an external file.

I then want to use a mouseover event [javascript] to change the background color of the cells in the table, and change the visibility of a second table to visible.
This works when there is No Class assigned to the cell, but when I add a class (as follows) it no longer works? Can someone tell me why and how to fix the problem. The codes are attached below.

Thanks,
Wedgetail

CSS File
#MainMenu{
z-index: 2;
position: absolute;
top: 120px;
left: 0px;}
.TCell{ background-Color: #B31111;
height: 40px;
width: 100px;}

HTML Code
<DIV id="MainMenu">
<TABLE id="Main">
<tr><td Class="TCell" align=center onmouseover"mover(0)"
onmouseout="mout(0)">
Menu Item 1</td></tr>

<tr><td Class="TCell" align=center onmouseover"mover(1)"
onmouseout="mout(1)">
Menu Item 2</td></tr>
</TABLE></DIV>

JAVASCRIPT
function mover(src){document.getElementById('Main').tbodies [0].rows[src].cells[0].bgcolor = '#CC5555';}

function mout(src){document.getElementById('Main').tbodies[0].rows[src].cells[0].bgcolor = '#B31111';}

Reply With Quote
  #2  
Old August 20th, 2004, 03:05 AM
Itsacon's Avatar
Itsacon Itsacon is offline
Command Line Warrior
Click here for more information
 
Join Date: Aug 2004
Location: Sector ZZ9 Plural Z Alpha
Posts: 956 Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)Itsacon User rank is Lance Corporal (50 - 100 Reputation Level)  Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2Folding Points: 682581 Folding Title: Super Ultimate Folder - Level 2
Time spent in forums: 6 Days 8 h 23 m 34 sec
Reputation Power: 4
Send a message via ICQ to Itsacon
My javascript isn't really good, but have you considered implementing a 'a:hover' in your stylesheet? Might do the same trick.

Good luck

Reply With Quote
  #3  
Old August 24th, 2004, 01:44 PM
EiSa EiSa is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Sep 2002
Location: Norway
Posts: 184 EiSa User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 h 22 m 24 sec
Reputation Power: 6
Do as Itsacon says, javascript and tables are no good for menus. Use lists and CSS instead. You find several premade solutions here:
http://css.maxdesign.com.au/index.htm
__________________
Strictly CSS | Poker Cognac XO

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > CSS and Javascript for navigation Table


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway