title: A little javascript help needed here (easy)
body: <pre><code>  function addOption(selectbox, val, txt){
    ......
    }
  
    addOption(list, "Cars", "Cars");
  </code></pre>
  
  <p>I need to add this in front of the text of the function:</p>
  
  <pre><code>  &amp;nbsp;&amp;nbsp;&amp;nbsp;
  </code></pre>
  
  <p>So that there is space coming in before the option text...Never mind what it is for, it is just confusing... I just don't know how to insert it into the js code.</p>
  
  <p>If I do it like this:</p>
  
  <pre><code>  addOption(list, "Cars", "&amp;nbsp;&amp;nbsp;&amp;nbsp;Cars");
  </code></pre>
  
  <p>Then the <code>&amp;nbsp;&amp;nbsp;&amp;nbsp;</code> comes into the text, so it gets displayed for the users.
  However I need it to be interpreted as "space"...</p>
  
  <p>If you don't understand let me know...</p>
  
  <p>How can I do this? Quotes, double quotes etc?</p>
  
  <p>Thanks</p>
  
  <p>UPDATE: <br></p>
  
  <pre><code>function addOption(selectbox, value, text, cl )
  {
      var optn = document.createElement("OPTION");
      optn.text = text;
      optn.value = value;
      if (cl==1){ optn.className = "nav_option_main"; }
      selectbox.options.add(optn);
  }
  </code></pre>