I have a search field that when you hit enter it fires the keyup event and loads the grid. Well, in certain cases the field has to be numeric depending upon the search criteria. Well if it is not a messagebox appears and tells the user to enter a number, the problem is if the user hits the enter key, the messagebox is killed but then the keyup event is fired again therefore reexecuting the messagebox because the search field still has a number in it. Pretty much this is an endless loop unless the user actually hits the button using the mouse. Does anyone know how to prevent the keyup event from being fired or how I can detect that the enter key was pressed from a messagebox??