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

9 posts, 0 answers
  1. Nahid
    Nahid avatar
    28 posts
    Member since:
    Aug 2010

    Posted 09 May 2011 Link to this post

    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

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 09 May 2011 Link to this post

    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.

  3. Nahid
    Nahid avatar
    28 posts
    Member since:
    Aug 2010

    Posted 09 May 2011 Link to this post

    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

  4. Marin Bratanov
    Admin
    Marin Bratanov avatar
    2811 posts
    Member since:
    Jun 2013

    Posted 10 May 2011 Link to this post

    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.

  5. Hassan
    Hassan avatar
    6 posts
    Member since:
    Sep 2012

    Posted 02 Dec 2011 Link to this post

    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" />

     

     

  6. Stacy
    Stacy avatar
    84 posts
    Member since:
    Dec 2010

    Posted 09 Jan 2012 Link to this post

    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>

  7. Stacy
    Stacy avatar
    84 posts
    Member since:
    Dec 2010

    Posted 10 Jan 2012 Link to this post

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

  8. jumpstart
    jumpstart avatar
    479 posts
    Member since:
    Nov 2011

    Posted 10 Jan 2012 Link to this post

    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,

  9. Chue Shee
    Chue Shee avatar
    3 posts
    Member since:
    Sep 2011

    Posted 12 Jan 2012 Link to this post

    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

Back to Top