Window.event is not working in Firefox

Thanks

I changed the code as follows :

  •  function SearchName(txtObj,selObj,e)
    
  •  var	keyPressed;
    

    if(window.event)
    keyPressed = window.event.keyCode; // IE
    else
    keyPressed = e.which; // Firefox

  •   <input type="text" name="txt1" onKeyPress="SearchName(this,selList,event)" value="<Type To Search>" onClick="javascript:this.value='';" style="width:200px;">
    

Now, it’s fine in IE and FF.