Chyba: uncaught exception: Nebolo povolené vytvorenie wrappera pre objekt triedy UnnamedClass
Zatial som to skusal na Mozilla/5.0 (X11; U; Linux i686; sk; rv:1.8.1.14) Gecko/20080418 Ubuntu/7.10 (gutsy) Firefox/2.0.0.14
tabbox.xul:
Kód: Vybrať všetko
<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window
id="tabbox" title="tabbox"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<script src="tabbox.js"></script>
<button label="pridaj" oncommand="pridaj()" />
<tabbox id="tbZalozky1" onselect="alert('zzz')" />
</window>
Kód: Vybrať všetko
function pridaj() {
var tabbox = document.getElementById('tbZalozky1');
// tabs
var tabs = document.createElement('tabs');
tabbox.appendChild(tabs);
// prvy tab
var tab = document.createElement('tab');
tab.setAttribute('id','First');
tab.setAttribute('label','First');
tabs.appendChild(tab);
// druhy tab
var tab2 = document.createElement('tab');
tab2.setAttribute('id','Second');
tab2.setAttribute('label','Second');
tabs.appendChild(tab2);
}