Hi All!
my problem is the following:
I have many textboxes. They have TextChanged events attached. After ajax postback I use the following code snippets to give the focus of the actual (clicked) textbox
my code :
js:
function focusActElement()
{
if(actElement != '')
{
document.getElementById(actElement).focus();
//if I use document.getElementById(actElement).select();
//works fine in IE7, too but I don't want to select the texts in the boxes
}
}
in Page_Load i'm calling:
public static void TrackFocusAfterAjaxPostbacks(Page page, RadAjaxManager radAjaxManager)
{
// Insert startup script
string scriptKey = "focusFunction";
if (!page.ClientScript.IsStartupScriptRegistered(page.GetType(), scriptKey))
{
page.ClientScript.RegisterStartupScript(page.GetType(), scriptKey, String.Format("focusActElement();"), true);
}
radAjaxManager.ClientEvents.OnResponseEnd = "focusActElement";
}
In FF works fine, but in IE7 just with id.select() functioning well and I don't like to select texts in the textboxes.
can somebody help?
thx
my problem is the following:
I have many textboxes. They have TextChanged events attached. After ajax postback I use the following code snippets to give the focus of the actual (clicked) textbox
my code :
js:
function focusActElement()
{
if(actElement != '')
{
document.getElementById(actElement).focus();
//if I use document.getElementById(actElement).select();
//works fine in IE7, too but I don't want to select the texts in the boxes
}
}
in Page_Load i'm calling:
public static void TrackFocusAfterAjaxPostbacks(Page page, RadAjaxManager radAjaxManager)
{
// Insert startup script
string scriptKey = "focusFunction";
if (!page.ClientScript.IsStartupScriptRegistered(page.GetType(), scriptKey))
{
page.ClientScript.RegisterStartupScript(page.GetType(), scriptKey, String.Format("focusActElement();"), true);
}
radAjaxManager.ClientEvents.OnResponseEnd = "focusActElement";
}
In FF works fine, but in IE7 just with id.select() functioning well and I don't like to select texts in the textboxes.
can somebody help?
thx