Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 336
  • Last Modified:

To hide select box and filter


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

  • 2
2 Solutions
Big MontySenior Web Developer / CEO of Commented:
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
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";
lulu50Author Commented:
Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now