Clear field value and simulate enter?
<p>I'm using the quicksearch (<a href="https://github.com/riklomas/quicksearch" rel="nofollow">https://github.com/riklomas/quicksearch</a>) jQuery to hide elements in a <code>table</code> by entering text into a text box and then it only shows the ones that match. </p>

<p>This works fine, but I want to be able to clear the text box. I am using the following code to do that...</p>

<pre><code>&lt;script&gt;
function clearsearch(){  
document.getElementById('id_search').value = "";
}
&lt;/script&gt;

&lt;a onclick="clearsearch()" id="clearsearch"&gt;Clear&lt;/a&gt;
</code></pre>

<p>This also works fine at clearing the field, but the script doesn't respond. I think the reason why it's not responding is because when I clear it with the clear script above, <strong>I need to focus on the <code>input</code> and press the delete key.</strong></p>

<p>Ex.) If I simply type text in the text box, and then delete it by hand, it works fine. If I run the clear script, and it deletes the text, the results don't show. If I run the script, it deletes the text, and I press delete within the <code>input</code> the script responds.</p>

<p>Is there a way that I can first clear the text box, and then simulate the delete key within the text box?</p>
