Attach noselect to div dynamically without throwing errors in JavaScript
<pre><code>// No select for Internet Explorer
this.gContainer.onmousedown = function(evt) {
    noselect;
}
</code></pre>

<p>This works great, but throws 'no select unknown' in Chrome/Firefox. I've tried putting try catch block around it, but this stops it functioning. </p>

<p>Any ideas?</p>
