title: Variable that contains Brackets causes problems
body: <p>Easy stuff: I read the value of an select box when clicking on a Button and writing it into a text field:</p>
  
  <p>The Select box:</p>
  
  <pre><code>&lt;select name="link[link_category]"&gt;
    &lt;option value="Fun"&gt;Sport&lt;/option&gt;
    &lt;option value="Music"&gt;Music&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Now I have my button</p>
  
  <pre><code>&lt;button class="btn btn-success" onclick="myFunction()"&gt;Continue&lt;/button&gt;
  </code></pre>
  
  <p>that triggers a simple function</p>
  
  <pre><code>&lt;script&gt;
  function myFunction()
  {
    result = document.new_link.link[link_category].value;
    document.getElementById("demo").innerHTML=result;
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>result reads the value from the select box and the function outputs the value in a field called "demo"</p>
  
  <pre><code>&lt;p id="demo"&gt;&lt;/p&gt;
  </code></pre>
  
  <p>My Problem:</p>
  
  <p>Using a simple name for the  Box like "abc" makes everything work like a charm. But as soon as using brackets (I need brackets for my rails app to work) it says</p>
  
  <p>*Uncaught ReferenceError: link_category is not defined*</p>
  
  <p>How can I use brackets to work with my JS function?</p>
  
  <p>Thanks for any help.</p>