[advanced search]
Results from the most recent live auction are here.
21 members in the live chat room. Join Chat!
Register Rules & FAQ NP$ Store Active Threads Mark Forums Read
Go Back   NamePros.Com > Design and Development > Programming
User Name
Password

Old 01-16-2007, 04:57 PM   · #1
VaporAction
New Member
 
Trader Rating: (0)
Join Date: Nov 2006
Posts: 12
NP$: 0.00 (Donate)
VaporAction is an unknown quantity at this point
Javascript: changing css attributes

'm new to javascript so my code is probably all messed up...anyway, here goes...
I'm trying to make a drop down menu composed of images using javascript...
I tried making function that would be triggered by onMouseOver and onMouseOut events...
I know how to make it happen if I use a different function for each menu item...but for efficiency I tried writing the function so that it would know which menu item had called it and display the appropriate image...just for testing purposes, I'm only using 2 menu items right now...they're images with the id "topChem" and "topMin"

"topChem" when moused over should display "botChem"

"topMin" when moused over should display "botMin"

here's the code that hasn't been working...

Code:
function menuOver() { var source = window.event.srcElement.id; if (source==document.getElementById("topChem")) { document.getElementById("botChem").style.visibility = "visible"; } else if (source==document.getElementById("topMin")) { document.getElementById("botMin").style.visibility = "visible"; } }


Please register or log-in into NamePros to hide ads
VaporAction is offline   Reply With Quote
Closed Thread

NamePros is a revenue sharing forum.

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


Site Sponsors
Hunting Moon Website Header Design Website Header Design
Advertise your business at NamePros
All times are GMT -7. The time now is 10:56 AM.


Powered by: vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0