Open Tech Support
Open 

Tech Support Community
Back to HomeCommunityReviewsGuidesDownloadsLinkageMarketplaceContact Us

 »  Forum Navigation

Home
Post a Question
About Our Site
Support Our Site

What is this site?
Who are we?

Tolitz.Com - The Cynic Eye of the Third World Guy

Enhanced with Snapshots

 

 »  Advertisement


Go Back   Open Tech Support Community > SUPPORT FORUMS > Internet




Reply

 

LinkBack Thread Tools
Old 04-12-2007, 12:24 AM   #1 (permalink)

Cool Newcomer
 
Type Text Here's Avatar
 
Join Date: Aug 2005
Posts: 6


Question Java Code help

Okay, I suck at java code. What can I say. I got this code and what I need to happen is depending on the menu var name, I need it to choose a colour accordingly.

Code:
<script type="text/javascript">

var menu1=new Array()
menu1[0]='<a href="http://www.mannahouseyouth.com/info">Info</a>'
menu1[1]='<a href="http://www.mannahouseyouth.com/info2">Something else?</a>'
menu1[2]='<a href="http://www.mannahouseyouth.com/info2">Mooshu?</a>'
menu1[3]='<a href="http://www.mannahouseyouth.com/info2">Dounut</a>'


var menu2=new Array()
menu2[0]='<a href="http://www.mannahouseyouth.com/tribe1">link1</a>'
menu2[1]='<a href="http://www.mannahouseyouth.com/tribe2">link2</a>'
menu2[2]='<a href="http://www.mannahouseyouth.com/tribe3">link3</a>'
		
var menuwidth='132px' 
var menubgcolor='#ED1B24'  
var disappeardelay=250  
var hidemenu_onclick="yes" 



var ie4=document.all
var ns6=document.getElementById&&!document.all

if (ie4||ns6)
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
</style>
See right now. Here.
Code:
document.write('<div id="dropmenudiv" style="visibility:hidden;width:'+menuwidth+';background-color:'+menubgcolor+'" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>')
is what I think needs to change. Somehow I need to get it not put the menubgcolor as a standard, but check what var it is, eg, menu1 or menu2, or menu3 and then place in a var named menubgcolor1, 2, 3.

Does that make sense?
Is it easily done?

Get back to me, thanks in advance.
~TTH
Type Text Here is offline   Reply With Quote
Sponsored Links
Old 04-12-2007, 10:26 PM   #2 (permalink)

I Live in OTS
 
FadedMaster's Avatar
 
Join Date: Aug 2003
Location: Wisconsin
Posts: 1,716


Re: Java Code help

I'm not sure what you're trying to do from the start... haha. But it's been a long while since I've done JavaScript.

www.htmlgoodies.com is a pretty good site for tutorials. But if I get some time, I'll look over some JavaScript and see if I can figure it out for ya. I've been messing with Java lately, just not JavaScript. So for me to try and help ya with Java on the brain... I'm sure I'd just end up giving you something that just won't work at all in JavaScript. haha.

-----------------------------
Desktop: Windows 7 Ultimate x64
CoolerMaster Centurion 534
Asus P5B Deluxe (w/ WiFi)
Intel Core 2 Duo E6600
4GB Corsair XMS2 PC2 6400
300GB 10000 RPM VeolciRaptor
250GB 7200 RPM SATA Maxtor
2 x 1TB WD MyBooks
BFG GeForce 8800 GT OC 512MB
630w Corsair PSU

Laptop: HP dv6885se
FadedMaster is offline   Reply With Quote
Old 04-22-2007, 08:19 PM   #3 (permalink)

Cool Newcomer
 
Type Text Here's Avatar
 
Join Date: Aug 2005
Posts: 6


Re: Java Code help

Thank you for your help tho'. Is there anyone else?

I'll try and define my problem a bit better.

The above code is to make drop down menu for 5 boxs of differen colours, when you scroll over each box the javascript above makes a box drop down with links inside, right now, all the box drop downs are the same colour, when they need to be a colour that refeerences with the box they are hovering over.
Type Text Here is offline   Reply With Quote
Old 04-23-2007, 04:57 PM   #4 (permalink)

Learning From My Mistakes
 
newman55's Avatar
 
Join Date: Sep 2003
Location: Miami, FL
Posts: 623


Re: Java Code help

heh, I'm pretty much in the same boat as you. I'm trying to crete a function that assigns a different math fnction to each radio button and will work if the radio is selected (under conditionals of course).
If you know how to do that, please reaf my thread.

-----------------------------
Lets Go Heat!!!

http://www.imagehosting.com/out.php/i350133_viper2.jpg
newman55 is offline   Reply With Quote
Reply

Bookmarks

Thread Tools


Similar Threads

Thread Thread Starter Forum Replies Last Post
Java problems Foogar Software 3 10-03-2004 12:43 AM
Red Hat Wants Open Source Java, Looking for Sun's Support TotalRecall General News 0 06-23-2003 03:34 PM
PGP Releases Source Code For Review TotalRecall General News 2 12-06-2002 12:53 PM
On the nature of Java applets AngstMerchant Internet 4 08-28-2002 11:39 AM
Microsoft gives new life to Java Tweaker General News 2 06-18-2002 03:09 PM







Powered by vBulletin® Version 3.8.2. Copyright © 2000-2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2
Copyright 2000-2008 Open Tech Support.  All Rights Reserved.  Site Design and Development by Tolitz Rosel.