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

RadWindow Modal not working in MOSS

1 Answer 54 Views
Window
This is a migrated thread and some comments may be shown as answers.
Saravanan
Top achievements
Rank 1
Saravanan asked on 16 Aug 2011, 12:19 PM
Hello telerik team, i am trying to show a modal popup using RadWindow. It is working fine in SP2010. but in Sharepoint 2007 (MOSS) i am able to access the parent (Page) scrollbar. i need to restrict that. i have attached the code as image. Could i get some suggestions.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 17 Aug 2011, 10:48 AM
Hello Paramahamsa,

  If the page has a scrollbar you will be able to scroll it if the RadWindow is modal. This is due to the fact that you cannot take an element from the page on top of the scrollbar (i.e. the modal overlay). If you wish to disable the scrollbars you can do so when the RadWIndow is shown and restore them when it is closed, for example:
var bodyOverflow = ""
var htmlOverflow = ""
function openRadWindow(width, height) 
    //store the overflow 
    bodyOverflow = document.body.style.overflow; 
    htmlOverflow = document.documentElement.style.overflow; 
    //hide the overflow 
    document.body.style.overflow = "hidden"
    document.documentElement.style.overflow = "hidden"
    var oWnd = window.radopen(null, "RadWindow1"); 
    oWnd.setSize(width, height); 
    oWnd.center(); 
}
  
function OnClientClose(sender, args) 
    //restore the overflow 
    document.body.style.overflow = bodyOverflow; 
    document.documentElement.style.overflow = htmlOverflow; 
}

If I have misunderstood your issue and you are actually getting scrollbars because you show it then what you can do is try to set its dimensions in the markup, so that it will automatically calculate its position according to them, without the added moving and resizing.

  You can also try to call the moveTo and resize functions with a small timeout (you can start with about 300 for example and reduce it if it works), and even 0 milliseconds may suffice.

Best wishes,
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.

Tags
Window
Asked by
Saravanan
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or