I want to use the YUI-ext library and I'd like to know if my code is correct or if have other mode of use it
Ext.onReady(function(){
// Cria-se o DIV para a Barra da Área de Desktop:
var myDIVBarraIniciar = document.createElement("div");
myDIVBarraIniciar.setAttribute("id", "BarraDaAreaDeDesktop");
myDIVBarraIniciar.style.height = "36px";
myDIVBarraIniciar.style.position = "absolute";
myDIVBarraIniciar.style.left = "0px";
myDIVBarraIniciar.style.right = "0px";
myDIVBarraIniciar.style.bottom = "0px";
myDIVBarraIniciar.style.backgroundImage = "url(../Imagens/FundoBarraHMLive02.gif)";
// So that the DIV is visible for the DOM, inserts the same in the BODY of the page:
document.body.appendChild (to myDIVBarraIniciar);
// Buttons objects of the YUI-EXT Are created and inside insert the same ones of the Bar of Desktop:
// **********
var myDIVButton01 = document.createElement("div");
myDIVButton01.setAttribute("id", "Button01");
myDIVButton01.style.position = "absolute";
myDIVButton01.style.left = "10px";
myDIVButton01.style.top = "6px";
myDIVBarraIniciar.appendChild(myDIVButton01);
var myButton01 = new Ext.Button('Button01',{text:'Teste 01'});
// **********
var myDIVButton02 = document.createElement("div");
myDIVButton02.setAttribute("id", "Button02");
myDIVButton02.style.position = "absolute";
myDIVButton02.style.left = "100px";
myDIVButton02.style.top = "6px";
myDIVBarraIniciar.appendChild(myDIVButton02);
var myButton02 = new Ext.Button('Button02',{text:'Teste 02'});
// **********
var myDIVButton03 = document.createElement("div");
myDIVButton03.setAttribute("id", "Button03");
myDIVButton03.style.position = "absolute";
myDIVButton03.style.left = "190px";
myDIVButton03.style.top = "6px";
myDIVBarraIniciar.appendChild(myDIVButton03);
var myButton03 = new Ext.Button('Button03',{text:'Teste 03'});
});
</script>