Solved

JS, hide/show div based on dropdown selection

Posted on 2013-01-04
3
566 Views
Last Modified: 2013-01-04
Hi,

I'm trying to display divs based on a standard html dropdown selection.
I have several div's on the same page, that needs to be visible/hidden, based on dropdown selection.

This is what I have, but it only work on the first two textarea, why does it not work on the last example?

http://jsfiddle.net/JDCW8/
0
Comment
Question by:kgp43
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
Comment Utility
test page : http://jsfiddle.net/9Q5nY/

ID attribute must be unique in a page
Use NAME attrubute instead
0
 

Author Comment

by:kgp43
Comment Utility
Seems to work, thanks a lot :)
0
 

Author Closing Comment

by:kgp43
Comment Utility
Perfect :D
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
This article discusses how to create an extensible mechanism for linked drop downs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now