Archive

Posts Tagged ‘PrototypeJS’

Inserting new ‘<tr>’ and ‘<br/>’ elements with PrototypeJS

October 1st, 2011 Comments off

Apparently one can’t insert two and more ‘<tr>’ elements into a ‘<tbody>’ using PrototypeJS 1.7.0.0 and 1.6.0.3 if there’s also a ‘<br/>’ element involved in the conspiracy so that code simply won’t work at all:

var new_content = 'foo
bar';
$('my-tbody').insert(new_content);

One needs to leave out the poor ‘<br/>’ and I guess that applies to inserting ‘<br/>’ in general, not only in this situation but thankfully right now I only need to dynamically add new table rows not line breaks..

@fourthrealm

Share
Categories: Software Tags: ,