views:

6

answers:

0

I developed a simple web app in the browser where there are 3 input boxes . The first input box has a ajax search suggestion box drop down when user starts keying in something. For example, the first input box is for user to key in username, when user key in "alan", a dropdown-like suggestion box will show below the input box to show top 5 usersname contain the word "alan", the list is query from a sql server. After user select one of the username from the list, the user name is displayed in the input box, this is working fine.

But the problem is that after user selected the username from the dropdown-like list of usernames, the cursor is locked in the first input box and not able to move out from this input box. I've tried to set the focus to 2nd inputbox by putting in document.getElementbyID("secondinputboxid").focus hope but it doesn't set the focus to the second input box, really need help here.

Thanks.