Click buttons to add different types... Add '; function addFakeTab(type, content) { var fake; if (!(fake = fakes[type])) { fake = fakes[type] = tab.ownerDocument.createElementNS(apf.ns.aml, "page"); fake.setAttribute("visible", false); fake.setAttribute("id", type); tab.appendChild(fake); tab.insertMarkup(app); } if (!content) content = "Tab nr. " + ++counter; var t = tab.add(content, type + counter, type, fake); t.content = content; } function setFakeTab(e) { console.log('setFakeTab', e); var fake, page = e.nextPage; if (fake = fakes[page.type]) { fake.$ext.innerHTML = page.content; } } function showFakeTab(e) { console.log('showFakeTab', e); var fake, page = e.nextPage; if (fake = fakes[page.type]) { //page.setAttribute("visible", false); //fake.setAttribute("visible", true); } } ]]>