invoking keypress event without actually pressing key in javascript
<p>hi i want spacebar to be fired in javascript without pressing spacebar in textbox,i tried this code please help me to solve this</p>

<pre><code>  &lt;script language="javascript" type="text/javascript"&gt;
        jQuery(document).ready(function () {
            var getOldValue = jQuery("#&lt;%=txtCompany.ClientID%&gt;");
                var e = jQuery.Event("keydown");
                e.which = 32; //key code
                jQuery("#&lt;%=txtCompany.ClientID%&gt;").trigger(e);

        });
    &lt;/script&gt;
</code></pre>

<p>and aspx page is</p>

<pre><code> &lt;asp:TextBox ID="txtCompany"&gt;&lt;/asp:TextBox&gt;
</code></pre>
