Dynamically open a radwindow defined in Javascript

Jennilelane

New Member
Objective:- From the server-side, I need to open a radwindow(defined in javascipt of the aspx page) automatically on an IF condition.Code used:-In aspx page, I defined the radwindow as:-\[code\]<telerik:RadWindowManager Skin="WBDA" ID="AssetPreviewManager" Modal="true" EnableEmbeddedSkins="false" runat="server" DestroyOnClose="true" Behavior="Close" style="z-index:8000"> <Windows> <telerik:RadWindow ID="DisclaimerAlertWindow" runat="server" Width="720px" Height="220px" Modal="true" visibleStatusbar="false" VisibleTitlebar="false" keepInScreenBounds="true" title="Sourav"> </telerik:RadWindow> </Windows> </telerik:RadWindowManager>\[/code\]In Javascript, a fucntion is defined for opening the radwindow:-\[code\]function openRadWindow() { var oWnd = radopen('DisclaimerAlert.aspx, 'DisclaimerAlertWindow'); oWnd.set_title('Access Denied !'); oWnd.Center(); return false; }\[/code\]So on the server side of the aspx page, In the Page Load event an IF condition is checked and then I'm calling 'openRadWindow()' function as:-\[code\]protected void Page_Load(object sender, EventArgs e){if (fieldValue =http://stackoverflow.com/questions/12770342/="False") { string xyz = "<script type='text/javascript' lang='Javascript'>myFunction();</script>"; ClientScript.RegisterStartupScript(this.GetType(), "Window", xyz); }}\[/code\]Problem:-But on running this, these Javascript errors are coming:-[*]Object doesn't support this property or method.[*]'undefined' is null or not an objectPlease help how to achieve my objective. I am totally stuck.
 
Back
Top