Dear all,
I’m trying to open the Rad window as modal and to be able to calculate the size of the opened window based on the opened page size i.e 400x400 and keep it centered. I don’t not want to use the autosize property.
Below is my Rad window setting as well the JS code which I use to recalculate the window size to fill the window.
Yourhelp is appreciated to open the modal window centered and in correct size based on the content page.
var
oWnd = window.radopen(_EncryptedURL,
"AdvancedForm"
);
oWnd.set_title(pageTitle);
resizeRadWindow(oWnd);
function
resizeRadWindow(radWindow) {
var
windowHeight = $(window).height();
var
windowWidth = $(window).width();
windowHeight = (windowHeight * 97.5) / 100;
windowWidth = (windowWidth * 98) / 100;
radWindow.moveTo(10, 10);
radWindow.setSize(windowWidth, windowHeight);
}
<
rad:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
>
<
Windows
>
<
rad:RadWindow
ID
=
"AdvancedForm"
runat
=
"server"
Modal
=
"True"
OpenerElementID
=
"showDialog"
InitialBehaviors
=
"None"
ShowContentDuringLoad
=
"false"
Behaviors
=
"Close"
OnClientClose
=
"refreshScheduler"
ReloadOnShow
=
"True"
Title
=
""
NavigateUrl
=
""
VisibleStatusbar
=
"False"
>
</
rad:RadWindow
>
</
Windows
>
</
rad:RadWindowManager
>