WebFX WebBoard
Message Thread:
View All Messages
Back to WebFX
 dynamics objects, Flavio, April 2, 2004
     Re:dynamics objects, Mikael, April 2, 2004
         Re:dynamics objects, Flavio, April 3, 2004
             Re:dynamics objects, Erik Arvidsson, April 3, 2004
                 Re:dynamics objects, Flavio, April 3, 2004
                     Re:dynamics objects, Erik Arvidsson, April 7, 2004
                         Re:dynamics objects, Flavio, April 17, 2004
                             Re:dynamics objects, Erik Arvidsson, April 18, 2004
                                 Re:dynamics objects, Flavio, April 18, 2004
                                     Re:dynamics objects, Erik Arvidsson, April 22, 2004
                                         Re:dynamics objects, Flavio, April 23, 2004
                         Re:dynamics objects, Mikael, April 9, 2004
                     Re:dynamics objects, Mikael, April 7, 2004

Subject: Re:dynamics objects From: Flavio Date: April 17, 2004
Erik

The functions and events are now running ok...
Just a new problem occur. When i add the "tbody" element my objects appear to lost all the attributes as width, colspan and align!!!
is anything that im doing wrong again???
the 2 codes are below!

//----------1st code----------------//
function teste(el)
{
if( el == null )
{
el = document.getElementsByTagName("body").item(0);
}
else
{
alert(el.id);
}
tableButton = document.createElement("table");
tableBody = document.createElement("tbody");
trImage = document.createElement("tr");
trText = document.createElement("tr");
tdLeft = document.createElement("td");
tdImage = document.createElement("td");
tdRight = document.createElement("td");
tdText = document.createElement("td");
imageButton = document.createElement("img");

//Definicoes da tabela
tableButton.border=1;
tableButton.width=800;
tableButton.height=200;
tableButton.cellpading=0;
tableButton.cellspacing=0;

//Definicoes do tr que vai a imagem
trImage.height="75%";

//Definicoes do td a esquerda da imagem
tdLeft.appendChild(document.createTextNode(" "));

//Definicoes do td a direita da imagem
tdRight.appendChild(document.createTextNode(" "));

//Definicoes do td com a imagem
tdImage.width="50%";
tdImage.align="center";
tdImage.valign="bottom";

//Definicoes do td com o Texto
tdText.appendChild(document.createTextNode("Mais que hell!!!"));
tdText.align = "center";
tdText.valign = "top";
tdText.colspan = 10;

//Definicoes da imagem
imageButton.src="img/Toolbar-Customize.ico";
imageButton.height=100;
imageButton.width=100;

//Associando uns com os outros
tdImage.appendChild(imageButton);
trImage.appendChild(tdLeft);
trImage.appendChild(tdImage);
trImage.appendChild(tdRight);
trText.appendChild(tdText);
tableBody.appendChild(trImage);
tableBody.appendChild(trText);
tableButton.appendChild(tableBody);
el.appendChild(tableButton);
//associateEvent(tableButton,"mousemove",evtClick);
//tableButton.attachEvent("onmousemove",evtClick);
//associateEvent(tdImage,"mousemove",evtClick);
//tdImage.attachEvent("onmousemove",evtClick);
//tableButton.addEventListener("mousemove",evtClick, false);
if( el.innerHTML )
{
alert( el.innerHTML );
}
}

//---------------2nd code---------------------------//
function teste(el)
{
if( el == null )
{
el = document.getElementsByTagName("body").item(0);
}
else
{
alert(el.id);
}
tableButton = document.createElement("table");
trImage = document.createElement("tr");
trText = document.createElement("tr");
tdLeft = document.createElement("td");
tdImage = document.createElement("td");
tdRight = document.createElement("td");
tdText = document.createElement("td");
imageButton = document.createElement("img");

//Definicoes da tabela
tableButton.border=1;
tableButton.width=800;
tableButton.height=200;
tableButton.cellpading=0;
tableButton.cellspacing=0;

//Definicoes do tr que vai a imagem
trImage.height="75%";

//Definicoes do td a esquerda da imagem
tdLeft.appendChild(document.createTextNode(" "));

//Definicoes do td a direita da imagem
tdRight.appendChild(document.createTextNode(" "));

//Definicoes do td com a imagem
tdImage.width="50%";
tdImage.align="center";
tdImage.valign="bottom";

//Definicoes do td com o Texto
tdText.appendChild(document.createTextNode("Mais que hell!!!"));
tdText.align = "center";
tdText.valign = "top";
tdText.colspan = 10;

//Definicoes da imagem
imageButton.src="img/Toolbar-Customize.ico";
imageButton.height=100;
imageButton.width=100;

//Associando uns com os outros
tdImage.appendChild(imageButton);
trImage.appendChild(tdLeft);
trImage.appendChild(tdImage);
trImage.appendChild(tdRight);
trText.appendChild(tdText);
tableButton.appendChild(trImage);
tableButton.appendChild(trText);
el.appendChild(tableButton);
el.innerHTML+="";
//associateEvent(tableButton,"mousemove",evtClick);
//tableButton.attachEvent("onmousemove",evtClick);
//associateEvent(tdImage,"mousemove",evtClick);
//tdImage.attachEvent("onmousemove",evtClick);
//tableButton.addEventListener("mousemove",evtClick, false);
if( el.innerHTML )
{
alert( el.innerHTML );
}
}

thanx in advance!



Reply
Name: 
Email: 
Subject: 

Enter your reply to this message below. HTML tags are not supported but words that start with http://, ftp:// or mailto: are converted to links.


View All Messages
Back to WebFX