I have a aspx page that has a series of radTextBoxes. The behavior should be as follows: user enters a value, tabs to next control. If the user tabs again without entering any data, the focus should go to a button. I have the javascript that does this but there isn't any visual que to tell the user the button has focus. How do I get the visual que to show much like tabbing into a button where it changes color.
If I use the $find method I get the yellow screen of death.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
If I use an asp:button and run this, the button will give a visual que that it has the focus
function
SetFocSubmit(objTextCtrl) {
if
(objTextCtrl.value ==
""
) {
document.getElementById(
"btnCheckCodes_input"
).focus();
}
}
If I use the $find method I get the yellow screen of death.
System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
function
SetFocSubmit(objTextCtrl) {
if
(objTextCtrl.value ==
""
) {
var
btn = $find(
'<%= btnCheckCodes.clientID %>'
);
btn.focus();
}
}
If I use an asp:button and run this, the button will give a visual que that it has the focus