title: Hyphen in div id causing javascript error
body: <p>I'm having an issue with javascript whereby i am performing the following to close a popup window and update a field in the parent window with the required value. Code looks something like this:</p>
  
  <pre><code>&lt;script language="javascript" type="text/javascript"&gt;
      var FieldID = document.form.field22-1.value;
      self.parent.opener.document.+FieldID = 'some text';
      window.top.window.close();
  &lt;/script&gt;
  </code></pre>
  
  <p>However I am getting the following error:</p>
  
  <pre><code>Error: missing ; before statement
  </code></pre>
  
  <p>I have a funny feeling the javascript is interpreting the field id (field22-1) as having a subtraction in it. Which I guess would make sense. Any ideas/help would be ridiculously appreciated, really don't want to have to go back in and change the - in the code!</p>
  
  <p>Thanks in advance!</p>