Hi ... I'm trying to put in a confirmation popup when a user tries to move from a tab to a different one - the popup box is mainly to ask if they want to save their data or not or cancel the tab move. A code snippet is below (my company is still on the classic RadTabStrip - RadTabStrip.Net2):
The problem is that after calling on the 'OpenConfirmIfIsDirty' function, the code goes straight to the next lines, finishes this function and goes to the next tab while the radconfirm page is still displayed in the foreground.
How do I make it wait for the user to click on the radconfirm popup?
var tabConfirmResult;
function onClientTabSelecting(sender, eventArgs) {
OpenConfirmIfIsDirty('MilestonesTab', clientJobTabCallback); // Displays the radconfirm
if (tabConfirmResult == 'cancel') {
return false;
}
}
function clientJobTabCallback(radWindow, returnValue) {
tabConfirmResult = radWindow;
if(radWindow=='cancel') {
return;
} else {
if (radWindow == true) {
// Do processing here for Save.
}
return;
}
}
The problem is that after calling on the 'OpenConfirmIfIsDirty' function, the code goes straight to the next lines, finishes this function and goes to the next tab while the radconfirm page is still displayed in the foreground.
How do I make it wait for the user to click on the radconfirm popup?