I have a user control that allows users to do a search by selecting four filters or doing a keyword search. I use an asp image button below the filter and the text box for the keyword searches. I use server.transfer after the image is clicked to take the user to the results page. This works fine.<BR><BR>Now I was asked to add the functionality that will allow someone to select the filters or enter text in the keyword field and hit the enter key. This will serve the same purpose as clicking the appropriate image button.<BR><BR>I have a simple function:<BR>function submitform() {<BR> document.getElementById(&#039;imgKeywordSearch&#03 9;).click();<BR>}<BR><BR>which is place in my body tag:<BR> &#060;body leftMargin="0" topMargin="0" onkeypress="if(event.keyCode == 13){submitform();}"&#062;<BR><BR>Problem is that when a keyword search is done, I have to hit the enter button twice the first time and then it works. How can I make sure it works the first time?<BR>