js:-
function SetEnd(textBox)
{
if (textBox.createTextRange)
{
var fieldRange = textBox.createTextRange();
fieldRange.moveStart('character', textBox.value.length);
fieldRange.collapse();
fieldRange.select();
}
}
C#:-
HttpBrowserCapabilities httpBrowserCapabilities = new HttpBrowserCapabilities();
httpBrowserCapabilities = Request.Browser;
if (httpBrowserCapabilities.Browser != "Firefox")
{
searchTextBox.Attributes.Add("OnFocus", "SetEnd(this)");
}
No comments:
Post a Comment