Drop-down Menu

This is a discussion on "Drop-down Menu" within the JavaScript Forum section. This forum, and the thread "Drop-down Menu are both part of the Program Your Website category.



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

Notices


Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old May 17th, 2007, 15:24
kaz kaz is offline
Up'n'Coming Member
Join Date: Feb 2005
Location: Accra
Age: 42
Posts: 54
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to kaz
Drop-down Menu

I am trying to add a new link and create a new dropdown menu. Such that instead of 5 items in the menu, it'll now be six. The problem is any time i try to make changes , the changes don't reflect. Can you suggest what I have to to do as to make the menu reflect the new addition? Here is the code below for the previous 5.

Code: Select all
var numofitems = 5;

//menu constructor
function menu(allitems,thisitem,startstate){
callname= "gl"+thisitem;
divname="bottom"+thisitem;
this.numberofmenuitems = allitems;
this.caller = document.getElementById(callname);
this.thediv = document.getElementById(divname);
this.thediv.style.visibility = startstate;
}

//menu methods
function ehandler(event,theobj){
for (var i=1; i<= theobj.numberofmenuitems; i++){
var shutdiv =eval( "menuitem"+5+".thediv");
shutdiv.style.visibility="hidden";
}
theobj.thediv.style.visibility="visible";
}

function closesubnav(event){
if ((event.clientX >800)||(event.clientY > 180)){
for (var i=1; i<= numofitems; i++){
var shutdiv =eval('menuitem'+5+'.thediv');
shutdiv.style.visibility='hidden';
}
}
}

// -->
</script>

Last edited by Ryan Fait; May 24th, 2007 at 10:45. Reason: Please use the [code][/code] tags when posting code :)
Reply With Quote

  #2 (permalink)  
Old May 24th, 2007, 10:32
New Member
Join Date: Apr 2007
Location: india
Age: 28
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Drop-down Menu

Hi

just try with this drop down menu tool. it finds to be very easy

http://www.hscripts.com/tools/drop-down-menu/

rgds
GemGuy
Reply With Quote
Reply

Tags
not reflecting

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
Drop-down Menu kaz JavaScript Forum 7 May 23rd, 2007 10:05
I have a normal css menu, but want ot add drop down menu to it multichild Web Page Design 7 Jan 9th, 2007 16:07
Drop down menu ... Drysdale Web Page Design 3 Jul 21st, 2005 22:00
Drop Menu Help xKillswitchx Web Page Design 1 Jul 13th, 2005 17:56
help with drop menu makemesick JavaScript Forum 8 Apr 25th, 2005 21:19


All times are GMT. The time now is 04:36.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs 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 43