Note that there are some explanatory texts on larger screens.

plurals
  1. POHow do I correctly write this array for my javascript
    text
    copied!<p>I have run into this problem again and now really need to know how to correctly write this array.</p> <p>I have a drop-box that, based on the value selected, will display a particular field-set(s) via the ID of the field-set.</p> <p>In some cases, two different values from the drop-box may call the same field-sets. So for example, if I choose <strong>banners</strong>, several field-sets will be displayed, if I choose <strong>Homepage Updates</strong>, the same field-sets would be displayed. So I want my array to basically be>> if the value selected in project type drop-box equals <strong>Banners</strong> or <strong>Homepage Updates</strong>, show the specified field-sets. The problem is, <strong>only</strong> the first option works. In this case Banners. When I select Homepage Updates, nothing is displayed.</p> <p>Does anyone know who to write this array correctly? I have a ton of types that I have to code and the array is the clearest way to write it, but I can't get past this hurdle. Help please. A portion of the array is below.</p> <pre><code>var projectTypes = new Array ( {id : '660' , value:('Banners' ||'Homepage Updates')}, {id : '659' , value:('Banners' || 'Homepage Updates')}, {id : '661' , value:'Banners'}, {id : '662' , value:'Banners'}, {id : '663' , value:'Banners'}, {id : '668' , value:'Redirect'}, {id : '229' , value:'Affiliates'}, {id : '236' , value:'Affiliates'}, {id : '242' , value:'Affiliates'}, {id : '250' , value:'Affiliates'}, {id : '251' , value:'Resources'}, {id : '375' , value:'Resources'}, {id : '376' , value:'Resources'}, {id : '377' , value:'Ads'}, {id : '237' , value:'Ads'} ); </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload