This code is Internet Explorer ONLY. The object/method is "createTextRange".
The JavaScript function might look like:
function setCursorPos( x ) {
var txtRange = x.createTextRange();
txtRange.moveStart( "character", x.value.length - 2 );
txtRange.moveEnd( "character", 0 );
txtRange.select();
}
And you call it:
<form >
<input type="text" onfocus="setCursorPos(this);" />
</form>
What this will do is move the cursor to the END of the current value of the textbox.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37
Did this work? Do you need more help? Please give us some feedback.
tgreer
Made Her Cry
2,118 posts since Dec 2004
Reputation Points: 227
Solved Threads: 37