Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/11/2008, 12:37
nicoram
 
Fecha de Ingreso: diciembre-2007
Mensajes: 4
Antigüedad: 16 años, 9 meses
Puntos: 0
Problema de compatibilidad DOM

Resulta que tengo el siguiente codigo y funcionaba bien en firefox y en IE, pero ahora solo me corre en firefox ... si alguien sabe que etiquetas debo cambiar para que me corran en ambos se los agradeceria mucho.

saludos.

codigo:

<script type="text/javascript" language="javascript">
var count = 0;
function addLine(){
count += 1;

var content = document.getElementById('ul');
var LI = document.createElement('li');
var TABLA = document.createElement('table');
var FILA1 = document.createElement('tr');
var FILA2 = document.createElement('tr');
var FILA3 = document.createElement('tr');

TABLA.setAttribute('cellpadding', 2);
TABLA.setAttribute('cellspacing', 0);
TABLA.setAttribute('width', "100%");
TABLA.setAttribute('border', "0");

var COLUMNA1 = document.createElement('td');
COLUMNA1.setAttribute('width', 250);
COLUMNA1.align = 'right';

var COLUMNA2 = document.createElement('td');
COLUMNA2.align = 'left';
COLUMNA2.setAttribute('class',"formContacto");

var COLUMNA3 = document.createElement('td');
COLUMNA3.setAttribute('width', 250);
COLUMNA3.align = 'right';

var COLUMNA4 = document.createElement('td');
COLUMNA4.align = 'left';
COLUMNA4.setAttribute('class',"formContacto");

var COLUMNA5 = document.createElement('td');
COLUMNA5.setAttribute('width', 250);
COLUMNA5.align = 'right';

var COLUMNA6 = document.createElement('td');
COLUMNA6.align = 'left';
COLUMNA6.setAttribute('class',"formContacto");

var input0 = document.createElement('input');
input0.setAttribute('runnat', "server");
input0.setAttribute('class','formContacto');
input0.type = 'text';
input0.name = 'myInput' + count + '_0';

var input1 = document.createElement('input');
input1.type = 'text';
input1.name = 'myInput' + count + '_1';
input1.setAttribute('class','formContacto');

var input2 = document.createElement('input');
input2.type = 'text';
input2.name = 'myInput' + count + '_2';
input2.setAttribute('class','formContacto');

var text1 = document.createTextNode("Product: ");
var text2 = document.createTextNode("Own Product / Thrid party-Vendor name: ");
var text3 = document.createTextNode("Revenue US$(last three fisical years): ");

LI.appendChild(TABLA);
TABLA.appendChild(FILA1);
TABLA.appendChild(FILA2);
TABLA.appendChild(FILA3);

FILA1.appendChild(COLUMNA1);
COLUMNA1.appendChild(text1);
FILA1.appendChild(COLUMNA2);
COLUMNA2.appendChild(input0);

FILA2.appendChild(COLUMNA3);
COLUMNA3.appendChild(text2);
FILA2.appendChild(COLUMNA4);
COLUMNA4.appendChild(input1);

FILA3.appendChild(COLUMNA5);
COLUMNA5.appendChild(text3);
FILA3.appendChild(COLUMNA6);
COLUMNA6.appendChild(input2);

content.appendChild(LI);
}
</script>