I get the following javascript error when loading a page where a RadTextBox control exists after setting the RadTextBox.ClientEvents.OnButtonClick property server-side:
"Object expected."
And this error only shows up after setting this property like so:
If you view the source the you can see that button associated with the textBox looks like this:
And the JavaScript generated by Telerik looks like so:
Any ideas why I'm getting this error? I am unable to click the textBox button as a result.
Thanks,
Andrew
"Object expected."
And this error only shows up after setting this property like so:
| textBox.ClientEvents.OnButtonClick = "OpenLookupResultsWindow(0, 8)"; |
If you view the source the you can see that button associated with the textBox looks like this:
| <td class="riBtn"><a href="#" onclick="return false;" id="HeaderGridDock_C_HeaderGrid1_radGrid_ctl00_ctl04_HeaderGridTextBox-0-0_GoButton"><span>Button</span></a></td> |
And the JavaScript generated by Telerik looks like so:
| Sys.Application.add_init(function() { |
| $create(Telerik.Web.UI.RadTextBox, {"_focused":false,"clientStateFieldID":"HeaderGridDock_C_HeaderGrid1_radGrid_ctl00_ctl04_HeaderGridTextBox-8-0_ClientState","enabled":true,"showButton":true,"styles":{HoveredStyle: ["width:97px;", "riTextBox riHover"],InvalidStyle: ["width:97px;", "riTextBox riError"],DisabledStyle: ["width:97px;", "riTextBox riDisabled"],FocusedStyle: ["width:97px;", "riTextBox riFocused"],EmptyMessageStyle: ["width:97px;", "riTextBox riEmpty"],ReadOnlyStyle: ["width:97px;", "riTextBox riRead"],EnabledStyle: ["width:97px;", "riTextBox riEnabled"]}}, {"buttonClick":OpenLookupResultsWindow(0,8)}, null, $get("HeaderGridDock_C_HeaderGrid1_radGrid_ctl00_ctl04_HeaderGridTextBox-8-0")); |
Any ideas why I'm getting this error? I am unable to click the textBox button as a result.
Thanks,
Andrew
