error opening rad window

4 posts, 1 answers
  1. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 23 Feb 2009 Link to this post


    Im getting this error, "Microsoft JScript runtime error: 'undefined' is null or not an object", when trying to open a rad window using the radopen function , it seems as if the radWindowManager cannot be found, because in the following function _1d is undefined after it has passed the second line, this function is created automatically.












    i need to open the window after the code behind is executed, this is the code im using to open the window.

    aspx page:



    telerik:RadWindowManager ID="RadWindowManager1" runat="server"



    Behavior="Default" InitialBehavior="None" Left="" style="display: none;" Top="">







    <telerik:RadWindow ID="radwUploadFiles" runat="server"



    NavigateUrl="~/Bursaries/UploadConfig.aspx" Title="Upload File(s)"



    VisibleStatusbar="false" Width="840px" Height="620px" ReloadOnShow="true" Skin="Web20">













    <script type="text/javascript">



    function ShowUploader()





    null, "radwUploadFiles"); 



    code behind(in the image button click event):



    imgbtn = sender as ImageButton;



    "OnLoad", "ShowUploader();return false;");


    any help would be appreciated, thanks.
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 23 Feb 2009 Link to this post


    I guess you want to open RadWindow from the click event of image button. You can try the code snippet below for achieving this (by using RegsterStartupScript). Try this and see whether it suits your need.

    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)  
        ImageButton imgbtn = sender as ImageButton;  
        string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(ShowUploader);</script>";  
        ClientScript.RegisterStartupScript(this.GetType(), "ShowUploader", script);  

  3. CBARS
    CBARS avatar
    55 posts
    Member since:
    Sep 2008

    Posted 23 Feb 2009 Link to this post

    Hi, yes it works great, thanks for the quick reply.
  4. Luis
    Luis avatar
    1 posts
    Member since:
    Mar 2017

    Posted 02 Mar 2017 Link to this post

    Hi, when I use this JS

    GetRadWindowManager().open(null, "Modal");

    I get the error:

    JavaScript runtime error: Unable to get property 'open' of undefined or null reference

    The radwindow "Modal" has a NavigateURL asigned via CodeBehind

    cadena = "../loader.aspx?anio=" + cboYear.SelectedItem.Value + "&mes=" + cboMes.SelectedItem.Value
    rwmModal.Windows(0).NavigateUrl = cadena

    I am using this code to register the script

    If (Not ClientScript.IsStartupScriptRegistered("muestra")) Then
        Page.ClientScript.RegisterStartupScript(Me.GetType(), "muestra", script, True)
    End If


    If I try to use window.radopen() I get the same error, and if it is posible, how can I close the RadWindow from JS?

    I'm using Telerik 2016.2 with VS2013

Back to Top