• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

creating submenus ... newbie

 
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there,
I (think!) I have a JavaScript question... I would like to make a webpage that has a simple form on it, say three options listed one after the other down the page with a checkbox or radiobutton next to each option:
option1
option2
option3
What I would like to do is when the user clicks one of these options (here, option2 say), a submenu appears underneath that option:
option1
option2
suboption1
suboption2
suboption3
option3
Is it easy to do something like this? Does anyone know of a good tutorial or web resource that could show me how best to do this?
Any advice would be much appreciated,
Gillian Klee
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I personally would do it with DHTML....fancy type of javascript with layers. I will write you a code and post it here by late monday night EST. It should be rather easy to use. I am cyurrently working on a tutorial on this too, but that is on hold do to other projects. I will comment it wiell so you can adapt it to your needs.
Eric
 
Gill Clover
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Eric Pascarello:
I personally would do it with DHTML....fancy type of javascript with layers.


Hi Eric,
Thanks very much for your help - one question though - do layers work across a range of browsers or just in Internet Explorer? It would be preferable if I could get this working using any browser.
Gillian
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Layers work in all browsers if code right!
 
Eric Pascarello
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
okay here is what I came up with
see if this helps
http://www10.brinkster.com/a1ien51/Scripts/checkboxtree.htm
Eric
 
Gill Clover
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Eric,
Thanks very very much for your help regarding submenus/layers - I'm impressed by your website!
Might have another question for you but I'm going to play around with what I've got first and see if I can figure it out.
Thanks again,
Gillian Klee
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic