Error in dock window

2 posts, 0 answers
  1. sandy
    sandy avatar
    23 posts
    Member since:
    Aug 2010

    Posted 02 Jan 2013 Link to this post

    Hi ,Am getting this error,
    SCRIPT5007: Unable to get value of the property 'get_element': object is null or undefined
    Events.aspx, line 196 character 17 and am getting error in dock.get_width() error is undefined
    this is my script.

                function openForm() {
                    var dock = $find("ctl00_ContentPlaceHolder1_RadDock1");
                    // Center the RadDock on the screen
                    var viewPort = $telerik.getViewPortSize();
                     var viewPort = $telerik.getViewPortSize();
                    var xPos = Math.round((viewPort.width - parseInt(dock.get_width())) / 2);
                    var yPos = Math.round((viewPort.height - parseInt(dock.get_height())) / 2);
                    $telerik.setLocation(dock.get_element(), { x: xPos, y: yPos });


                    var descriptionTextBox = $get('ctl00_ContentPlaceHolder1_RadDock1_C_DescriptionText');


  2. Dobromir
    Dobromir avatar
    1633 posts

    Posted 04 Jan 2013 Link to this post

    Hi Sandy,

    The provided JavaScript function looks OK. According to the error that you experience it seems that the dock is not yet created or the ID provided to the $find() method is not RadDock's ClientID. Could you please verify that you are calling this function inside(or as) Application.Load handler?

    In addition, to be able to provide more to the point answer we will need more detailed information regarding the specific scenario:
    • Which version of RadControls for ASP.NET AJAX and .NET Framework are used in the application?
    • Under which browser and its version the problem occurs?
    • Could you please provide a simple fully runnable project reproducing the problem so we can investigate it further?

    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. DevCraft R3 2016 release webinar banner
Back to Top