Please note: This discussion group is malfunctioning and you must open quoted text in order to read the last line of the previous post. The last tow lines should be
}); }); If you do not copy the second }); my code will fail. On Jul 8, 2:26 pm, "Brian J. Fink" <[EMAIL PROTECTED]> wrote: > This is the best I can come up with. I wanted to catch the onselect > event, but for some reason Safari won't respond. (Didn't want to keep > using a timeout. It's a hack, but it works.) I reduced the length of > the timeout to 0 milliseconds, and I cleaned up the call by passing > the this object as a parameter. I also changed the moveStart for IE to > a collapse instead. > > $(function() { > $(':text').focus(function() { > if (this.setSelectionRange) /* DOM */ > { > setTimeout(function(t) { /* hack for select delay */ > t.setSelectionRange(t.value.length,t.value.length); > },0,this); > } > else if (this.createTextRange) /* IE */ > { > r=this.createTextRange(); > r.collapse(false); > r.select(); > } > }); > > });