Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

JS, hide/show div based on dropdown selection

Posted on 2013-01-04
3
Medium Priority
?
575 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 82

Accepted Solution

by:
leakim971 earned 2000 total points
ID: 38745524
test page : http://jsfiddle.net/9Q5nY/

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

Author Comment

by:kgp43
ID: 38745676
Seems to work, thanks a lot :)
0
 

Author Closing Comment

by:kgp43
ID: 38745694
Perfect :D
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Originally, this post was published on Monitis Blog, you can check it here . Websites are getting bigger and more complicated by the day. Video, images and custom fonts are all great for showcasing your product or service. But the price to pay in…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

705 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