This is a migrated thread and some comments may be shown as answers.

Error in dock window

1 Answer 38 Views
Dock
This is a migrated thread and some comments may be shown as answers.
sandy
Top achievements
Rank 1
Iron
Veteran
sandy asked on 03 Jan 2013, 05:18 AM
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 });


                dock.set_closed(false);

                var descriptionTextBox = $get('ctl00_ContentPlaceHolder1_RadDock1_C_DescriptionText');
                descriptionTextBox.focus();

                Sys.Application.remove_load(openForm);
            }

1 Answer, 1 is accepted

Sort by
0
Dobromir
Telerik team
answered on 04 Jan 2013, 08:12 AM
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?

Regards,
Dobromir
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.
Tags
Dock
Asked by
sandy
Top achievements
Rank 1
Iron
Veteran
Answers by
Dobromir
Telerik team
Share this question
or