newbie question

J

jch

Hello. I'm trying to do something and I don't even know what it's called. I
want to make a list of items and include a "+", or other suitable character,
next to a line so the user can click on it and expand that line into a more
verbose section. Clicking on "+" again would collapse the section abck to
the one-liner. Can someone point me in the right direction? Thank you.
 
B

brucie

Hello. I'm trying to do something and I don't even know what it's called. I
want to make a list of items and include a "+", or other suitable character,
next to a line so the user can click on it and expand that line into a more
verbose section. Clicking on "+" again would collapse the section abck to
the one-liner. Can someone point me in the right direction? Thank you.

you're looking for a hierarchical tree menu type of thingy. most you'll
come across use javascript which search engines don't support and some
people don't have it available so be careful how you implement it.
supply normal text links at the bottom of the page or something like
that so people/search engines can still navigate your site.

http://www.google.com/search?q=javascript+tree+menu&num=50

if you're feeling adventurous you may want to give CSS menus a go but
they need a modern browser (opera/NS/Moz) to work fully.
http://www.meyerweb.com/eric/css/edge/menus/demo.html

you can also get menus that are generated on the server before being
sent to the browser so they don't (but some do) rely on client side
scripting to work. they'll work for everyone if they're well designed.
 
D

Dylan Parry

jch said:
Hello. I'm trying to do something and I don't even know what it's
called. I want to make a list of items and include a "+", or other
suitable character, next to a line so the user can click on it and
expand that line into a more verbose section. Clicking on "+" again
would collapse the section abck to the one-liner. Can someone point me
in the right direction? Thank you.

Kae Verens has an article explaining how to do this with a bit of
JavaScript which, unlike a lot of other examples using JS, degrades well
in browsers that don't support it. Check out the article here:
<url:http://www.webpageworkshop.co.uk/main/article11>

HTH
 
N

Nick Howes

Kae Verens has an article explaining how to do this with a bit of
JavaScript which, unlike a lot of other examples using JS, degrades well
in browsers that don't support it. Check out the article here:
<url:http://www.webpageworkshop.co.uk/main/article11>

indeed, it's entirely possible to program it so that browsers without
javascript show the expanded text, which i would think would be the desired
behaviour.
 
T

Toby A Inkster

jch said:
Hello. I'm trying to do something and I don't even know what it's called. I
want to make a list of items and include a "+", or other suitable character,
next to a line so the user can click on it and expand that line into a more
verbose section. Clicking on "+" again would collapse the section abck to
the one-liner. Can someone point me in the right direction? Thank you.

Collapsing menus is the term generally used. An example here:

http://www.goddamn.co.uk/tobyink/scratch/menu

The example works perfectly in Mozilla 1.4 and Opera 7.2 although fails
miserably in Opera 6 and Mozilla 1.0. In Internet Explorer 6 the hover
effect doesn't work, but the menus work otherwise.

No doubt with a bit of patience these issues could be resolved (except for
the Opera 6 issue, as Opera's pre-Presto rendering engine couldn't handle
reflowing of HTML) and you'd end up with a nice menu.
 
R

Richard Clark

"Nick Howes" said:
indeed, it's entirely possible to program it so that browsers without
javascript show the expanded text, which i would think would be the desired
behaviour.

Yes. And it is always good design practice to turn off script and see how the
page displays to the INCREASING percentage of people surfing with script
disabled because of, 1. virus fear due to browser security holes, or 2. script
that doesn't work right and/or crashes the browser.

Web pages should behave like web pages, not buggy computer programs.

(Sorry for the rant! I feel much better now. :)


Pilgrims and the Mayflower Compact
http://members.aol.com/RichClark7/pilgrims.htm

Jesus' Birth (and related issues)
http://members.aol.com/RichClark7/read/birth_JC.htm
 
W

Whitecrest

richclark7 said:
Web pages should behave like web pages, not buggy computer programs.
(Sorry for the rant! I feel much better now. :)

No need to be sorry about a rant, that is what usenet is here for.

Interesting, my grandparents were members of the Mayflower Society (I
think that is what it was called) It was a group of people that were
direct descendants of people that were on the mayflower.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top