I'm running into an issue where my numeric textbox is posting back when I set focus on it with javascript.
I have a popup panel that calls a script which sets focus to the numeric textbox when it is shown. The script below is what is getting called when the panel is shown. The GetVerifyClientID is a function in the codebehind which grabs the ClientID of the Numeric Textbox. This works fine if I swap out for a standard asp textbox.
If I modify the script above to the following, it seems to pop up the telerik control's name just fine...
For whatever reason, when I allow the top function to be called, the page posts back again. I'm unsure of what to turn off on the telerik control so that it doesn't post back when focus is set to it. I need it to be able to post back afterward so the user can hit enter after putting in a value (I have this functionality currently, I just don't want to lose it).
Also, if I view source on the page, the script seems to be getting created with the correct control ID.
Thanks in advance for any help!
Robert
I have a popup panel that calls a script which sets focus to the numeric textbox when it is shown. The script below is what is getting called when the panel is shown. The GetVerifyClientID is a function in the codebehind which grabs the ClientID of the Numeric Textbox. This works fine if I swap out for a standard asp textbox.
| <script type='text/javascript' >function SetVerifyFocus(){$get('<%=GetVerifyClientID() %>').focus();}</script> |
If I modify the script above to the following, it seems to pop up the telerik control's name just fine...
| <script type='text/javascript' >function SetVerifyFocus(){alert('<%=GetVerifyClientID() %>');}</script> |
For whatever reason, when I allow the top function to be called, the page posts back again. I'm unsure of what to turn off on the telerik control so that it doesn't post back when focus is set to it. I need it to be able to post back afterward so the user can hit enter after putting in a value (I have this functionality currently, I just don't want to lose it).
Also, if I view source on the page, the script seems to be getting created with the correct control ID.
Thanks in advance for any help!
Robert