<script>
var tabs = new AW.UI.Tabs;
tabs.setId("tabs");
tabs.setItemText([" Info", "preferences", "Privacy", "Content", "Connections"]);
tabs.setItemCount(5);
tabs.setSelectedItems([0]);
document.write(tabs);
document.write('<br>');
var button12 = new AW.UI.Button;
button12.setId("button12");
button12.setControlText("Prev");
button12.setControlDisabled(true)
document.write(button12);
var button13 = new AW.UI.Button;
button13.setId("button13");
button13.setControlText("Next");
document.write(button13);
var button14 = new AW.UI.Button;
button14.setId("button14");
button14.setControlText("Apply");
document.write(button14);
button12.onClick = function(){
var curI = tabs.getSelectedItems()[0]
if(curI>0){
tabs.setSelectedItems( [curI-1]);
tabs.setCurrentItem(curI-1);
}
if( curI - 1 == 0 ){ button12.setControlDisabled(true) }
if( curI < tabs.getItemCount() ){ button13.setControlDisabled(false) }
}
button13.onClick = function(){
var curI = tabs.getSelectedItems()[0];
var countabs = tabs.getItemCount();
if( curI < countabs ){
tabs.setSelectedItems( [curI+1]);
tabs.setCurrentItem(curI+1)
}
if( curI + 1 > 0 ){ button12.setControlDisabled(false) }
if( curI + 1 == countabs-1 ){ button13.setControlDisabled(true) }
}
tabs.onSelectedItemsChanged = function( i) {
tabs.setCurrentItem(i);
if( i == 0 ){ button12.setControlDisabled(true);button13.setControlDisabled(false); }
if( i == tabs.getItemCount()-1 ){ button12.setControlDisabled(false); button13.setControlDisabled(true) }
if( i > 0 && i < tabs.getItemCount()-1 ){ button12.setControlDisabled(false);button13.setControlDisabled(false) }
tabs.setCurrentItem(i)
}
</script>
This topic is archived.