Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Hide / reveal content with html form menu
Old 07-27-2007, 08:42 PM Hide / reveal content with html form menu
Junior Talker

Posts: 2
Trades: 0
I'm sure I've seen it before, but I've been googling for over two hours now and am no futher along.

A program I'm working on requires that users be able to add either an adult or student into the database. A different form is required for each, so after they click a button to add a new person, I would like a simple html drop down menu with the following options:

--> Select One... (Default)
--> Adult
--> Student

Upon selecting an option, I would like to have the appropriate form revealed on the current page. I know how to set the visibility and/or display attributes with CSS, but how can I get the drop down menu to change the attribute for the correct div?

Could anybody tell me how to accomplish this, or point me in the direction of an example???

Thank You Very Much!
ORIACO is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-28-2007, 12:19 AM Re: Hide / reveal content with html form menu
ADAM Web Design's Avatar
Canadastaninianite

Posts: 5,938
Name: Adam for web page design, not program
Location: Toronto, Ontario, Canada
Trades: 0
The reason you can't find the answer within CSS is because the answer you seek isn't purely a CSS solution.

It requires both CSS and Javascript...Javascript can control CSS attributes and display the appropriate content.

http://www.javascriptkit.com/jsref/style.shtml

This should get you started.

http://codepunk.hardwar.org.uk/ajs30.htm

This is a list of EVERY CSS attribute and its Javascript equivalent.

Run with the ball from there and see how far it takes you.
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
(my blog)


Please login or register to view this content. Registration is FREE
(with proof)
ADAM Web Design is offline
Reply With Quote
View Public Profile Visit ADAM Web Design's homepage!
 
Reply     « Reply to Hide / reveal content with html form menu
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15339 seconds with 12 queries