Microsoft JScript runtime error: Object doesn't support property or method 'radopen'

2 posts, 0 answers
  1. AAA
    AAA avatar
    17 posts
    Member since:
    Mar 2013

    Posted 11 Mar 2013 Link to this post

    I am attempting to open a radWindow from C# codebehind (using VS 2008, Telerik.Web.UI version 2012.2.724.35), however, I am getting this error:

    Microsoft JScript runtime error: Unable to get value of the property 'open': object is null or undefined

    My aspx code is:
    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>


    <script type="text/javascript">
        function OpenRadWindow() {
            var wnd = window.radopen("http://www.microsoft.com", null);
            wnd.setSize(300, 400);
            return false;
        }
    </script>

    The serverside code is: 
    protected void Page_Load(object sender, EventArgs e)
    {
        Page.ClientScript.RegisterStartupScript(this.GetType(), "getting data", "OpenRadWindow();", true);
    }

    What is causing the error?
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3602 posts

    Posted 12 Mar 2013 Link to this post

    Hi,


    I advise that you examine the following sticky thread on opening a RadWindow from the server: http://www.telerik.com/community/forums/aspnet-ajax/window/opening-radwindow-from-the-server.aspx. It explains how injecting a script is done properly by using the Sys.Application.Load event. With the current snippet the script is executed too early for the script controls to have been initialized.


    Regards,
    Marin Bratanov
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top