Hi,
I have a problem in using tabs.
I have three tabs(tab1,tab2,tab3).My requirement is if any changes done by the user in any tab and switches to other tab then a popup should come “changes are done , please save it ok or cancel”.
If user clicks ok then it will check the mandatory fields are empty are not, if any field is empty then alert the user “XYZ fields is Mandatory” and will be on the same tab(Tab where changes are done).
This behaviour is working fine if Iam on the same Tabs window. If I switch to any other browser/window/application by using alt+Tab key or minimize the browser in which my application is running then when i come back to the same tabs page then again it showing a popup saying “changes are done , please save it ok or cancel”(i.e again the tab selection procedure is done).If ok is selected then it will go to the tab where the user done changes.
Problem : The popup “changes are done , please save it ok or cancel” is showing twice if i navigate to other browser and come back.One thing i noted here is that if i do click on any place in the page(Tabs page)(i.e when curosr/control is not on the TAB) and navigate to other browserand come back then the popup is not getting invoked for second time.
If i use the same tabs page (without navigating to any browser) then popup will be getting once.
Using Tabset I created three tabs(tab1,tab2,tab3).
if user selects any tab then within the tabset Iam calling
Sample Code for using tabsets.
isc.TabSet.create({
ID: “topTabSet”,position:“relative”,
tabSelected: function(tabNum, tabPane, ID, tab)
{
if (ID && ID == “tab1”) {
}
if (ID && ID == “tab2”) {
}
if (ID && ID == “tab3”) {
}
},
tabs: [
{ID:“tab1”,
title: “AcctTAB”
},
{ID:“tab2”,
title: “AGGTAB”
},
{ID:“tab3”,
title: “GENTAB”
}
]
});
Note : I have doubt that once user done changes in one tab(tab1) and navigate to the other tab(tab2) then Iam sending the user back to the previous window using topTabSet.selectTab(“tab1”). If i switch to other window and come back to tabs window then again tab2 is getting loaded and showing popup and then to tab1.
Iam not understanding why again the tab2 is getting loaded after invoking alt+tab key (navigating to other window).
Please let me know how to solve this issue.
Thanks in Advance.