July 24, 2012

Drag Drop of webparts functionality is not working in Moss 2007

In Moss 2007, most of the times we want to move the added webparts from one webpart zone to another webpart zone by drag and drop. But sometimes, this functionality is missing in moss 2007 customised pages. The solution of this problem is to add the script to the master page of the site.

Refer to the below image :



Add the script between the <WePartPages:SPWebPartManager> and <form> tag.

        <script language="javascript" type="text/javascript">
            function MSOLayout_GetRealOffset(StartingObject, OffsetType, EndParent)
            {
                var realValue=0;
                if (!EndParent) EndParent=document.body;
                for (var currentObject=StartingObject; currentObject && currentObject !=EndParent && currentObject != document.body; currentObject=currentObject.offsetParent)
                {
                    var offset = eval('currentObject.offset'+OffsetType);
                    if (offset) realValue+=offset;
                }
                return realValue;
            }
        </script>


No comments:

Post a Comment

Error installing .Net Framework 3.5 in Sql Server 2012

During installation of Sql Server 2012 on Windows server 2012 or addition of roles and features for SharePoint 2013, the setup wizard will...