473,396 Members | 2,076 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,396 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 1305
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.