clearing selected text in inputbox via javascript
<p>I have beening modifying an autocomplete function for input text box javascript,
But I can trap the CTL keypress and at that time I want to take the text in the
inputbox which has some selected text TO CLEAR the SELECTED TEXT. I can't
seem to get the removeallRange to work.</p>

<p>Thanks</p>

<p>Snippit of function code:</p>

<pre><code>cAutocomplete.complete = function( hEvent )
{
if( hEvent == null )
{
    var hEvent = window.hEvent
}

var hElement = ( hEvent.srcElement ) ? hEvent.srcElement : hEvent.originalTarget

var sAA = hElement.getAttribute( 'autocomplete' ).toString()
if( sAA.indexOf( 'array:' ) &gt;= 0 )
{
    hArr = eval( sAA.substring( 6 ) )
}
else if(  sAA.indexOf( 'list:' ) &gt;= 0 )
{
    hArr = sAA.substring( 5 ).split( '|' )
}

if( hEvent.keyCode == 17 )  
{       

 //HERE I TRAP THE CTL keypress, and where I need to deselect - removeallRange.

}

if( hEvent.keyCode == 16 )  
{
    return
}
var sVal = hElement.value.toLowerCase()
</code></pre>

<p>etc...</p>
