Javascript can't work because of hypen
<p>From my <a href="http://jsfiddle.net/fredang85/GxVFH/" rel="nofollow">Fiddle</a></p>

<pre><code>&lt;select id="doesnt-work"&gt;
  &lt;option&gt;Apple&lt;/option&gt;
  &lt;option&gt;Orange&lt;/option&gt;
  &lt;option value="111"&gt;Pineapple&lt;/option&gt;
  &lt;option&gt;Banana&lt;/option&gt;
&lt;/select&gt;
&lt;input type="textbox" id="mytextbox"/&gt;
&lt;button onclick="displayResult(doesnt-work)"&gt;Click me&lt;/button&gt; 
</code></pre>

<p><strong>JavaScript</strong></p>

<pre><code>function displayResult(selTag)
{
var x=selTag.options[selTag.selectedIndex].text;
document.getElementById('mytextbox').value = x;
}
</code></pre>

<p>I know it's not working because of the hyphen between "doesnt-work"</p>

<p>I need to use hyphen as it's automatically created by my application and I don't have any control over it. </p>

<p>Does anyone know how?</p>
