That's pure javascript. $get is just a shortcut function for document.GetElementById in ajax. Since I was dealing with partial postbacks, that function was available to me and I used it. And it is working fine too, since I can see the textbox being updated and any other javascript I may insert there; like alert(something) etc.

The problem is why do I need to call the control.focus() method twice in quick succession to set the focus?? From what I know one call is the same as 100 calls, there should be nothing special going on there with the focus() method.

BTW, I tried that e.select = false; but it doesn't work.