So, here's my scenario - in our app, the content of the window can very likely change, so what I've done is added the following to the pages being opened:
This works great, except that if I then try to center the window every time, the window will remain open after a postback. How can I correct this so that the window gets centred and works normally?
(Side note: We tried using the auto-size, but it never did a great job of keeping the window sized properly).
Thanks,
Kori
function
pageLoad() { fixWindow(); }
function
fixWindow() {
// Fix the height to show the buttons in the right place.
var
oWnd = GetRadWindow();
var
contentHeight = $(
'#mainContent'
).height();
var
newHeight = contentHeight + 10;
var
windowWidth = oWnd.get_width();
$(
'#popupWrapper'
).height(newHeight);
$(
'#popupWrapper'
).width(windowWidth - 75);
var
windowHeight = newHeight + 105;
oWnd.set_height(windowHeight +
"px"
);
// if (oWnd != null) {
// oWnd.center();
// }
}
This works great, except that if I then try to center the window every time, the window will remain open after a postback. How can I correct this so that the window gets centred and works normally?
(Side note: We tried using the auto-size, but it never did a great job of keeping the window sized properly).
Thanks,
Kori