I am using the RadWindow as a dialog functionally it works fine for everything I am doing. There are two more cosmetic things I want to do and I am having trouble with them.
1. I want to set the initial focus to a textbox in the window. I have tried this in a javascript, form tag, and in the page load on the code behind and neither has worked:
javascript:
code behind:
2. I want to make a button on the window the default button and allow the enter key to press the button. I have set the button as the default button in the form tag and it appears to make it the default, but I press enter and the window clears all input, but it doesn't run the code for the button, then if I reenter the input and click the button with the mouse I get javascript errors.
form tag:
Thank you in advance for your help.
1. I want to set the initial focus to a textbox in the window. I have tried this in a javascript, form tag, and in the page load on the code behind and neither has worked:
javascript:
var templateName = document.getElementById("txtTemplateName");
templateName.focus();
code behind:
txtTemplateName.Focus();
form tag:
<
form id="form1" method="post" runat="server" defaultfocus="txtTemplateName">
2. I want to make a button on the window the default button and allow the enter key to press the button. I have set the button as the default button in the form tag and it appears to make it the default, but I press enter and the window clears all input, but it doesn't run the code for the button, then if I reenter the input and click the button with the mouse I get javascript errors.
form tag:
<
form id="form1" method="post" runat="server" defaultbutton="btnOK" >
Thank you in advance for your help.