or
var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>");<html lang="en"><head id="Head1" runat="server"> <meta charset="utf-8" /> <title>Blah</title></head><body> <form id="form1" class="form" runat="server"> <telerik:RadScriptManager ID="ScriptManager" runat="server" EnablePageMethods="True" EnableTheming="True"> </telerik:RadScriptManager> <div id="Div1" class="page" runat="server"> <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel" runat="server" Skin="Sitefinity" /> <telerik:RadAjaxManager ID="RadAjaxManager" runat="server"> <AjaxSettings> <telerik:AjaxSetting AjaxControlID="testButton"> <UpdatedControls> <telerik:AjaxUpdatedControl ControlID="testButton" UpdatePanelHeight="" /> </UpdatedControls> </telerik:AjaxSetting> </AjaxSettings> </telerik:RadAjaxManager> <asp:Button ID="testButton" runat="server" Text="Test Me" OnClientClick="TestMe('button');" /> </div> <script type="text/javascript"> function TestMe(argument) { var ajaxManager = $find("<%= RadAjaxManager.GetCurrent(this).ClientID %>"); if (ajaxManager == null) { alert('NULL. called by ' + argument); } else { alert('Got it from ' + argument); } } window.attachEvent("onload", function () { // will work fine if run on localhost TestMe('window.onload'); }); </script> </form></body></html>
.createContentPageAdditionalOptions .RadUpload { width:100px !important; } .RadUpload input { font-family: verdana !important; } .createContentPageAdditionalOptions .RadUpload input.ruFakeInput { display: none; } .RadUpload input.ruBrowse { background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important; width: auto !important; line-height:21px; height:23px; text-align:left; margin:0px 3px 0px 0px !important; padding:0px 8px 3px 18px !important; } .createContentPageAdditionalOptions .RadUpload .ruInputs { text-align:center; } .RadUpload input.ruBrowse, .createContentPageAdditionalOptions .RadUpload .ruUploadProgress, .createContentPageAdditionalOptions .RadUpload .ruCancel, .createContentPageAdditionalOptions .RadUpload .ruRemove { color:#fff !important; } .createContentPageAdditionalOptions .RadUpload .ruUploadProgress { background: url(/Images/btnLeftPartInactive.png) top left no-repeat !important; margin:0px 3px 0px 0px !important; height:23px; overflow:hidden; width:80px; } .RadUpload input.ruButtonHover { background: url(/Images/btnLeftPartActive.png) top left no-repeat !important; color: #d14b35 !important; } .RadUpload .ruFileWrap { width: auto !important; padding: 0px !important; background: url(/Images/btnRightPart.png) top right no-repeat !important; } .RadUpload input.ruBrowse, .createContentPageAdditionalOptions .RadUpload .ruCancel, .createContentPageAdditionalOptions .RadUpload .ruRemove, .RadUpload input.ruFileInput { cursor: pointer !important; }var modules = Telerik.Web.UI.RadAsyncUpload.Modules; if (modules && (modules.Silverlight.isAvailable() || modules.Flash.isAvailable())) { $(".ruFileWrap").live("mouseover mouseout", function (event) { $(this).children("input[class != 'ruFakeInput']").toggleClass("ruButtonHover"); }); }<telerik:RadAsyncUpload runat="server" ID="RadAsyncUploadImageForNavNode" AllowedFileExtensions="jpg,jpeg,png,gif" CssClass="divToBeCentered" MaxFileSize="5242880" MultipleFileSelection="Disabled" OnFileUploaded="RadAsyncUploadImageForNavNode_FileUploaded" EnableInlineProgress="false" Width="120px" MaxFileInputsCount="1" OnClientFileUploaded="RadAsyncUploadImageForNavNode_OnClientFileUploaded" Localization-Select="<%$ Resources:PGC, ProjectContentElement_UploadImage %>" Localization-Cancel="<%$ Resources:PGC, General_Cancel %>" Localization-Remove="<%$ Resources:PGC, General_Remove %>" > </telerik:RadAsyncUpload>function RadAsyncUploadImageForNavNode_OnClientFileUploaded(sender, args) { $("#btnRefreshUploadedImageToCurrentProjectElementStub").click(); }