Hi,
I have the following AJAXManager:
<telerik:RadAjaxManager ID="radAjaxManager" runat="server" EnableEmbeddedScripts="true" EnableAJAX="true" UpdatePanelsRenderMode="Block"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="pnlCheckingSystem"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlCheckingSystem" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="btnLogin"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="pnlLoggingIn" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
... and I am trying to "find" it using code I lifted from http://demos.telerik.com/aspnet-ajax/Ajax/Examples/Manager/ClientSideAPI/DefaultCS.aspx using the $find() function: (this is just before the BODY close tag)
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript" language="javascript"> |
function InitiateAsyncRequest(argument) { |
var ajaxManager = $find('<%= radAjaxManager.ClientID %>'); |
if (ajaxManager) ajaxManager.ajaxRequest(argument); |
else alert('Could not get control \'<%=radAjaxManager.ClientID %>\''); |
} |
InitiateAsyncRequest('clientCheck'); |
</script> |
</telerik:RadCodeBlock> |
Instead, radAjaxManager keeps coming back null (therefore displaying the alert). For your information, the control ID it displays is indeed 'ctl00_contentPlaceHolder_radAjaxManager', which does map to the rendered HTML:
<div id="login"> |
<h1>Login</h1> |
<!-- 2008.3.1125.35 --><div id="ctl00_contentPlaceHolder_radAjaxManagerSU"> |
<span id="ctl00_contentPlaceHolder_radAjaxManager" style="display:none;"></span> |
</div> |
By the way, what's the purpose of the RadCodeBlock? I got an exception suggesting I should add it.