the following code is used to create a select box/drop down box the user can type into. my problem is the if statment saying if keyCode != 0...that code let the user type as much code in as allowed. but i cannot change the focus away from that drop down box so the user can continue doing work on the page. can someone please help me?

<script LANGUAGE="JavaScript" >
<!-- Begin
var o = null;
//var isNN = (navigator.appName.indexOf("Netscape")!=-1);
var isIE = (navigator.appName == "Microsoft Internet Explorer");
//(is.ie && event.button!=1))
function beginEditing(menu){
finish();

if(menu[menu.selectedIndex].value == "editable"){
o = new Object();
o.editOption = menu[menu.selectedIndex];
o.editOption.old = o.editOption.text;
o.editOption.text = "";
menu.blur();
window.focus();
document.onkeypress = keyPressHandler;
document.onkeydown = keyDownHandler;

}
function keyDownHandler(e){
var keyCode = (isIE && event.keyCode); //issues
return (keyCode!=8 || keyPressHandler(e));
}
function keyPressHandler(e)
{
var option = o.editOption;
var keyCode = (isIE && event.keyCode); //issues
if(keyCode==8 || keyCode==37) {
option.text = option.text.substring(0,option.text.length-2)+" ";
}else if(keyCode==13){
finish();

}else if(keyCode!=0) {
option.text = option.text.substring(0,option.text.length-1) + String.fromCharCode(keyCode) + " ";
//else if(keyCode=="")
return false; }

}

function finish(){
if(o!=null){
option = o.editOption;
if(option.text.length > 1)
option.text = option.text.substring(0,option.text.length-1);
//think need something here to remove focus

else
option.text = option.old;
document.onkeypress = null;
document.onkeydown = null;
o = null;
}
}
}
//-->
</script>

<CFOUTPUT>
<select name="NumericAlts#loopcounter#" onChange="return beginEditing(this);">
<option default=""></option>
<option value="editable">edit</option>
<CFLOOP INDEX="loopcount" FROM="1" TO=#arraylen(sMyArray)#>
<cfparam name="form.NumericAlts#loopcounter#" default="">
<cfset temp2 = "form.NumericAlts" & evaluate(loopcounter)>
<!--- Set the value equall to the alpha alts and the list shows the numeric strings --->
<OPTION value="#sMyArrayAlpha[loopcount]#~#sMyArray[loopcount]#"
<cfif evaluate(temp2) is #sMyArrayAlpha[loopcount]#> selected </cfif>
>#sMyArray[loopcount]#</option>
</CFLOOP>
</select>
</CFOUTPUT>