Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Window > Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined

Not answered Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined

Feed from this thread
  • Nahid avatar

    Posted on May 9, 2011 (permalink)

    Hello, I am Developing a web application by using ASP.NET 3.5, jQuery and RadAjax Telerik Control. I get Error Messages when page Loading. that is :"Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined"

    the 1st Error Image: errormsg1.png
    and when I click to Open RadWindow then get same Error Message. and could not open radwindow

    2nd Image: errormsg2.png 
     

    How can I solved this Error. Help me..



    Thanks
    Nahid

    Reply

  • Posted on May 9, 2011 (permalink)

    Hello Nahid,

    I am not quite sure about the scenario that you are trying. Please make sure that you are getting the RadWindow object correctly while opening the window.
    Take a look at the following help article for the detailed information on opening the windows.
    Opening Windows

    Can you elaborate/give code if it doesn't help.


    Thanks,
    Shinu.

    Reply

  • Nahid avatar

    Posted on May 9, 2011 (permalink)

    Hello Shinu,
    Thanks for reply. but Its could not found "RadWindow" and  found error : "Microsoft JScript runtime error: Unable to get value of the property 'setUrl': object is null or undefined"  Show the Image in details...


    Thanks
    Nahid
    Attached files

    Reply

  • Marin Bratanov Marin Bratanov avatar

    Posted on May 10, 2011 (permalink)

    Hi Nahid,

    This error means that the oWnd object is null. It can be null for a number of reasons, from a typing mistake to a call to the function before the controls are loaded.

    The most probable, though, is that the RadWindow is inside an INaming container and the $find() method cannot get a correct reference by just using this ID. Please try the following syntax:

    var oWnd = $find("<%= rwMemberAccess.ClientID %>");

    which will resolve the final client ID of the control to be used in the JavaScript function.

    If this does not help please open a support ticket and send us a simple, fully runnable project that displays this issue so we can debug it locally and pinpoint the cause.


    All the best,
    Marin
    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

    Reply

  • Hassan avatar

    Posted on Dec 2, 2011 (permalink)

    Hi Nahid,
    Please Try this:

    Ascx File:
    =======

    <

    form id="form1" runat="server">

    <div>

    <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/register.Gif"

    OnClientClick="openWinContentTemplate(); return false;" />

    <telerik:RadScriptManager ID="RadScriptManager1"  Runat="server">

    </telerik:RadScriptManager>

    </div>

    <telerik:RadWindow ID="RadWindow1" runat="server">

    <ContentTemplate>

     <%-- Your Content here--%>

    <asp:Label ID="Label1" runat="server" Text="Show the RadWindow in aspx file from Ascx"></asp:Label>

     </ContentTemplate>

    </telerik:RadWindow>

    <script type="text/javascript">

    function openWinContentTemplate()

     {

     var ShowRadWindow = $telerik.$('[id$="RadWindow1"]').attr("id");

    var MyRadWindow = $find(ShowRadWindow);

     MyRadWindow.show();

    }

     </script>

     </form>
    Aspx File:(Drag and Drop Ascx file to Aspx Page)
    =========

     <uc1:RadWindowControl ID="RadWindowControl1" runat="server" />

     

     

    Reply

  • Stacy avatar

    Posted on Jan 9, 2012 (permalink)

    Trying to use your examples....I get this error

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

    when trying this code:

    <telerik:RadWindowManager ClientIDMode="Static" ID="PasswordWindow" Width="800" Height="157" VisibleStatusbar="false" Behaviors="Close,Move" runat="server" DestroyOnClose="True" Modal="true" >
     <Windows>
            <telerik:RadWindow ID="RadWindow1" runat="server" NavigateUrl="http://www.google.com">
            </telerik:RadWindow>
       </Windows>
    </telerik:RadWindowManager>
     
    <telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
     
    <script type="text/javascript">
        function OpenPasswordChange() {
                   var pwWin = window.radopen(null, "RadWindow1");
        }
    </script>
     
    </telerik:RadScriptBlock>

    Reply

  • Stacy avatar

    Posted on Jan 10, 2012 (permalink)

    As i said before, the above examples do not work for me

    Reply

  • jumpstart Master avatar

    Posted on Jan 10, 2012 (permalink)

    Stacy:

    It's pretty hard to diagnose the cause for this error from your limited code snippet. When I create a new project, add the code as you've provided, and run it, using Firefox 9.0.1 and IE. there are no errors.

    Can you tell me more about what you're trying to accomplish with the RadWindow? Are you trying to provide a login modal window?

    With more info, I can assist you.

    Regards,

    Reply

  • Chue Shee avatar

    Posted on Jan 12, 2012 (permalink)

    I was receiving a similar issue and resolved it by reviewing the reference.  Try the example below.
     

    function openWindow()
    {
         var oWnd = window.radopen(null, "RadWindow1");
         oWnd.SetUrl(oWnd.GetUrl());
    }

    In reference to: http://demos.telerik.com/aspnet-classic/Window/Examples/DialogReturnValue/DefaultCS.aspx

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Window > Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined
Related resources for "Microsoft JScript runtime error: Unable to set value of the property 'control': object is null or undefined"

ASP.NET Window Features  |  Documentation  |  Demos  |  Step-by-step Tutorial  ]