Foro aNieto2k » Desarrollo web

Problema con tablas en IE con prototype

(4 posts)

No tags yet.

  1. Anonymous

    Hola tengo un problema, a la hora de crear tablas con prototype y al intentar mostrar en IE no se ve, en FF se ve de maravilla
    la manera en que creo la tabla es:

    var tbody = new Element('tbody');
    var tabla = new Element('table');
    tr = new Element('tr',{'class':'titutab'});
    td = new Element('td').update('Descripción');
    tr.insert(td);
    td = new Element('td').update('Categoría');
    tr.insert(td);
    td = new Element('td').update('Acciones');
    tr.insert(td);
    tabla.insert(tr);
    tbody.insert(tabla);
    $('tabla1').update(tbody);

    alguien sabe que puedo hacer??

    Posted 1 year ago #
  2. melodi
    Member

    solo al final modifica por $('tabla1').appendChild(tbody); y ya con este corre en explorer y mozilla

    Posted 9 months ago #
  3. melodi
    Member


    Posted 9 months ago #
  4. melodi
    Member

    el codigo correcto seria asi:

    var tabla = new Element('table');
    var tbody = new Element('tbody');
    tr = new Element('tr',{'class':'titutab'});
    td = new Element('td').update('Descripción');
    tr.insert(td);
    td = new Element('td').update('Categoría');
    tr.insert(td);
    td = new Element('td').update('Acciones');
    tr.insert(td);
    tbody.insert(tr);
    tabla.insert(tbody);
    elemento.appendChild(tabla);

    Posted 8 months ago #

RSS feed for this topic

Reply

You must log in to post.