How do I add/remove tabs dynamically ?
I wonder, whether it is possible to add/remove a tab dynamically.
The code I have written (which is largely the example dialog modified to my needs) does not work out. What happens is, that the HTA I am using this in suddenly hangs when I execute addTabs(). Is there anything I overlooked ? Thanks.
function addTab() {
iTabsItemCount = iTabsItemCount +1;
aTabsSelected = [iTabsItemCount];
aTabsItemText.push("New Job");
tabs.setItemText(aTabsItemText);
tabs.setItemCount(iTabsItemCount);
tabs.setSelectedItems(aTabsSelected);
tabs.refresh();
// frame must be private. Not sure whether this makes sense or whether I need a unique, persistant object rather than a 'throw-away' one
var frame = new AW.HTML.DIV;
// need to think about a convention to automatically raise the ID
frame.setId("frame2");
document.write(frame);
var container = new AW.HTML.SPAN;
document.write(container);
}
The code I have written (which is largely the example dialog modified to my needs) does not work out. What happens is, that the HTA I am using this in suddenly hangs when I execute addTabs(). Is there anything I overlooked ? Thanks.
function addTab() {
iTabsItemCount = iTabsItemCount +1;
aTabsSelected = [iTabsItemCount];
aTabsItemText.push("New Job");
tabs.setItemText(aTabsItemText);
tabs.setItemCount(iTabsItemCount);
tabs.setSelectedItems(aTabsSelected);
tabs.refresh();
// frame must be private. Not sure whether this makes sense or whether I need a unique, persistant object rather than a 'throw-away' one
var frame = new AW.HTML.DIV;
// need to think about a convention to automatically raise the ID
frame.setId("frame2");
document.write(frame);
var container = new AW.HTML.SPAN;
document.write(container);
}
Orke
January 2,