473,394 Members | 1,721 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

i need help - questions about javascript and collapsible menu

hi,

i am a beginner when it comes to javascript, i would like to have a menu (see examples 1 and 2 below), that folds out to reveal sub links, pushing the other menu items down – and then springs back in place if you either

1.click on the main link again (STAFF in example 1)or
2. if you click on a different main link(STAFF, CAREERS or INTERNSHIP) (i think you know what i am talking about – just a boring moving menu)



example 1

STAFF

jane

john

etc

CAREERS

INTERNSHIPS

--------------------------------------

example 2

STAFF

CAREERS

work here

send cv

INTERNSHIPS

anyway, i know that i can save some of the javascript in a seperate .js file and link to it in the header, and i can save the style elements in my css sheet, but my dilema is that the items in the menu are bound to change, for example under staff – if someone clicks, all the staff names should appear below, but if i have to add a new staff member i would have to change every single page to include that new member as a link....

so in fact, what i want to do is put the actual link and menu skeleton in a js file or some other sort of file and then just place a scr in the html text (do you know what i mean)

does anyone have any ideas? i am sorry if this seems like a silly question, but i am just learning.



my site is

www.visionandvalue.com



i am talking about the grey menu running down the left hand side of the page (if you click on “people” it would be clear).



thanks for your help!



leah
Mar 20 '07 #1
1 1304
sicarie
4,677 Expert Mod 4TB
hi,

i am a beginner when it comes to javascript, i would like to have a menu (see examples 1 and 2 below), that folds out to reveal sub links, pushing the other menu items down – and then springs back in place if you either

1.click on the main link again (STAFF in example 1)or
2. if you click on a different main link(STAFF, CAREERS or INTERNSHIP) (i think you know what i am talking about – just a boring moving menu)



example 1

STAFF

jane

john

etc

CAREERS

INTERNSHIPS

--------------------------------------

example 2

STAFF

CAREERS

work here

send cv

INTERNSHIPS

anyway, i know that i can save some of the javascript in a seperate .js file and link to it in the header, and i can save the style elements in my css sheet, but my dilema is that the items in the menu are bound to change, for example under staff – if someone clicks, all the staff names should appear below, but if i have to add a new staff member i would have to change every single page to include that new member as a link....

so in fact, what i want to do is put the actual link and menu skeleton in a js file or some other sort of file and then just place a scr in the html text (do you know what i mean)

does anyone have any ideas? i am sorry if this seems like a silly question, but i am just learning.



my site is

www.visionandvalue.com



i am talking about the grey menu running down the left hand side of the page (if you click on “people” it would be clear).



thanks for your help!



leah
I'm betting if you asked a pointed question about your attempt at creating that menu in the Javascript forum (JavaScript, not Java - on the right hand side), someone there would be able to help you.
Mar 20 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: books1999 | last post by:
I have framset with leftFrame, mainFrame, TopFrame. I found this script : http://www.dynamicdrive.com/dynamicindex8/collapsemain.htm I wonder if it could be ajusted so that it collapses the...
2
by: pantagruel | last post by:
I have an old web application I did where browsers with dynamic capabilities received a drop down menu on the top of the page and a fold out on the left hand side of the page and non-dynamic...
3
by: Shapper | last post by:
Hello, I am working on an ASP.NET/VB web site. I have several links including menu links. Considerer a want to load a page named page.aspx. I can do it using javascript. Or using this code:...
1
by: mike | last post by:
The JavaScript below works fine for expandable/collapsible menus in IE, but Firefox 1.5 complains: "Error: loc.parentNode.nextSibling has no properties" and highlights the line...
0
by: madhur | last post by:
Hello I am trying to build a collapsible menu control similar to oen in http://rsa.com. I want to know, If I can extend the ASP.NET 2.0 Menu control for this purpose. Can I achieve that...
5
by: ting ting | last post by:
I am working on a ASP.net 2.0 version and I want to click a button to open a window. I was using window.open to write at vb side. Response.Write("<Script...
1
by: mahesh123 | last post by:
I am using Collapsible Panel in my project.But in other form of my project i want to use collapsible panel inside other Collapsible panel.Is it possible. Both panels are to be dinamic.Is it possible...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.