how to allow space?
<p>the below javascript code prevent user to put all special character including "space".</p>

<ol>
<li>through same function, I need to allow "space"..how to do this..please help</li>
<li><p>however user is unable to type any special character, but user can copy/paste special character. Is there any way to prevent this also...one way disable right click on page..any other way..please suggest!</p>

<pre><code>function isValidSearchText(evt) {
    var charCode = (evt.which) ? evt.which : event.keyCode;
    if ((charCode &lt; 48 || charCode &gt; 57) &amp;&amp; (charCode &lt; 97 || charCode &gt; 122) &amp;&amp; (charCode &lt; 65 || charCode &gt; 90))
        return false;
    return true;
}
</code></pre></li>
</ol>
