To hide select box and filter

Posted on 2011-09-12
Last Modified: 2012-05-12

I need to have the select box for the city and the filter choices to be hiden and
when the user select a state it should appear with the cities that are in the selected state.

The select church should be hidden unless the user select a city.

Please, take a look at my site

how can I first set the Select city dropdown box to hidden and when the user select a state to be visible I need to the same thing with city and church

Question by:lulu50
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
LVL 33

Accepted Solution

Big Monty earned 250 total points
ID: 36523888
for populating the dropdowns based upon the selection, check out:

for changing the visibility, just surround the select box with a div tag, set its visibility to hidden, then in the onchange event for the first dropdown, change its visibility to visible
LVL 82

Expert Comment

ID: 36523917
LVL 82

Assisted Solution

leakim971 earned 250 total points
ID: 36523951
you may use css to hide the city list by default :

#GetCity {

with : <select id="GetCity" name="GetCity" ...

in the callback of your ajax call (currently this may not be clear for you, just take your time to read the links provided) you unhide the list with :
document.getElementByid("getCity").style.visibility = "visible";

Author Closing Comment

ID: 36524251
Thank you

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Worldmap 1 28
Find out all repos that a user is most active on Github 1 28
Video Tutorial help 2 38
Open grouped links on a page in new tabs via jquery 5 42
In my daily work (mainly using, I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
In Part 1 ( we covered the hexagonal maze basics -- how the cells are represented in a JavaScript array and how the maze is displayed.  In this part, we'…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
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…

756 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