Associate each tabs elements with a AW.HTML.DIV
Hello, I want to use tabs to switch between different webpages. Each page is written in a AW.HTML.DIV, and thinking that it is possible to refresh the page. I show you that I have done with a simplified example :
In this exemple, the page still block on the page0.
Regards,
<script>
var result = new AW.HTML.DIV;
var menu = new AW.UI.Tabs;
menu.setItemText(["index0", "index1"]);
menu.setItemCount(2);
menu.setSelectedItems([0]);
menu.onItemClicked = function(event, index){
getInstantPage(index);
result.refresh();
};
document.write(menu);
var mainPage0 = new AW.HTML.DIV;
var label0 = new AW.UI.Label;
label0.setControlText("Page 0");
mainPage0.setContent("label0", label0);
var mainPage1 = new AW.HTML.DIV;
var label1 = new AW.UI.Label;
label1.setControlText("Page 1");
mainPage1.setContent("label1", label1);
result = mainPage0;
document.write(result);
function getInstantPage(index){
switch(index){
case(0):
result = mainPage0;
break;
case(1):
result = mainPage1;
break;
default:
break;
}
}
</script>
In this exemple, the page still block on the page0.
Regards,
G. Caplain
May 6,