Set Focus function on server side code (just pass in the string of the control name)
protected void setFocus( String ctrl )
{
string s = "[SCRIPT language='javascript']document.Form1.Editor1_" + ctrl + ".focus();[/SCRIPT]";
Page.RegisterStartupScript( "focus", s );
}
---------------------------------------------------------------------------------------
Function on server side code to assign javascript event to a particular ASP.NET control (Change the details passed to JavaScript function for each call)
txtStartDateDay.Attributes.Add("onkeyup", "SetFocusX('Editor1_txtStartDateDay','Editor1_txtStartDateMonth')");
In the HTML JavaScript function (checks the lenght of the field if two sets focus to the next)
function SetFocusX(oField, oField2)
{
var strText = document.getElementById(oField).value;
if(strText.length == 2)
{
document.getElementById(oField2).focus();
}
}
Subscribe to:
Post Comments (Atom)
1 comment:
Hi
discount zithromax
For Community Acquired Pneumonia, the recommended dose is 10 mg/kg and then followed by 5 mg/kg on the second day to the fifth day.
[url=http://www.fitzsoft.com/]zithromax azithromycin[/url]
It is also available in 500 mg tablet with the same description as the 250 mg tablet.
http://www.fitzsoft.com/ - buy azithromycin
Since this drug belongs to Pregnancy category B, there have been no evidence that it will not farm the fetus.
Post a Comment