javascript: Display all sections/fieldsets upon dropbox selection
<p>I am using the javascript code below to hide/how section based on project type selected. The value in the array below is the value selected from a dropbox. The id below is the section/fieldset id [i know they are numeric, but that's the way we got the app, so stuck with it right now]. I want to display several fieldset upon a particular selection, namely Special Events.</p>

<p>So, for example,  I want to say: if value selected equals <strong>Special Events</strong>, display ids [839, 840, 838], etc. How would I accomplish this within this code base?</p>

<pre><code>var projectTypes = new Array (
    {id : '838', value: 'Ad'},
    {id : '838', value: 'Cars'},
    {id : '839', value: 'Brochure'},
    {id : '839', value: 'Planes'},
    {id : '840', value: 'Bus Wrap'},
    {id : '840', value: 'Boats'},
    {id : '840', value: 'Special Events'},
);

refreshSections(project_type);



function refreshSections(selectedType) 
{   
    for (var i = 0; i &lt; projectTypes.length; i++) 
    {
        if (projectTypes[i].value == selectedType) 
        {
            document.getElementById("section-"+ projectTypes[i].id).style.display = '';
            break'
        } 
        else 
        {
            document.getElementById("section-"+ projectTypes[i].id).style.display = 'none';
        }
    }
}
</code></pre>

<p>Thank you in advance.</p>
