[thelist] js cursor position in a form
Brian Cummiskey
Brian at hondaswap.com
Wed Jan 4 22:57:16 CST 2006
Peter Brunone (EasyListBox.com) wrote:
> Hi Brian,
>
> Here's an IE-only approach (there's a Mozilla way as well, which I can provide if you need it):
>
> var inputText = myTextInput.createTextRange();
> // move to the fourth character
> inputText.moveStart("character", 4);
> // this will select any text after it so a keypress will
> // delete the old text and start adding new text
> inputText.select();
Thanks Peter- I'll give this a try tomorrow morning when I'm at the office.
Just out of curiosity, do you know which function(s) are ie-specifc,
thus causing it not to work cross-browser?
More information about the thelist
mailing list