I open a modal rad window using the code below and specify a callback function to display a confirmation message to make sure the user wants to close the window. Everything works fine if the window is opened to a specific size. However, if I open the window and then maximize it, when the user attempts to close the window, it seems that the the confirm message gets displayed "behind" the rad window. Since it is maximized, the user cannot see it. The window doesn't close and there is no indication to the user. I'm not sure why the massage appears "on top" of the rad window if it is opened to a particular size, but behind if it is maximzed, however is there a way to make sure the confirmaiton message is always on top of the active rad window, even if it is maximized?
function
openWindow(someUrl, width, heigth, xPos, yPos) {
var
oWin = window.radopen(someUrl,
'MyWindow'
);
oWin.setActive(
true
);
oWin.setSize(width, height);
if
(xPos !=
null
&& yPos !=
null
) {
oWin.moveTo(xPos, yPos);
}
else
{
oWin.center();
}
oWin.maximize();
oWin.add_beforeClose(onBeforeClose);
}
function
onBeforeClose(sender, arg) {
function
callbackFunction(arg) {
if
(arg) {
sender.remove_beforeClose(onBeforeClose);
sender.close();
}
}
arg.set_cancel(
true
);
radconfirm(
"Are you sure you want to close this window?"
, callbackFunction, 400, 150,
null
,
"Close Window"
);
}