Showing or hiding additional form fields, depend from..
Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. I get a selectbox from a side with a lot of city names.Visit Stack Exchange I've got a code that is working in my environment. I filter some names and push them into an array and hide them. var other Cities = new Array(); var default Cities = new Array(); var select Box City = j Query("select[name='city']"); if(select Box City.size() !The other ones are also pushed into an array, but shown. = 0) var select Box City = j Query("select[name='city']"); select Box City.find("option:first").attr("selected", true); $("select[name='city'] option[value='less']").hide(); if(select Box City.val() == "all") if(select Box City.val() == "less") . Edelmetallhandel vergleich. Now I append two options to the end of the selectbox, one is displayed, the other one hidden. In either case, they all show up in the select dropdown.When someone clicks the option all, the options from the array other Cities are shown and default Cities are hidden. You can disable options, but then they're still there, just greyed out.Hence, this code forcibly removes/appends the options.
How to hide/show select boxes depending on other choosed select..