Hi all I am having a requirement where I am using Ajax Tab, I am having 3 tabs. If user select second or 3 rd tab I would like throw an alert saying do you wish to move if yes I would like to move to next tab if not I would like to stay in the current tab
My sample script is as follows
<script type="text/Javascript>
function checkSave() {
sSave = window.confirm("You have some changes that have not been saved. Click OK to save now or CANCEL to continue without saving.");
if (sSave == true) {
var tabIndex = $find("TabContainer1"); //AdvOrBasicSearch is name of tabContainer
var tab = tabIndex.get_activeTab();
//tab = tabIndex.getPreviousTab();
//var i = tabIndex._activeTabIndex;
tabIndex.set_activeTab(tab);
} else {
return true;
}
}
</script>