Hi,
I'm trying to construct a table with Prototype's New Element function. I was experiencing problems in Firefox when I was updating the thead with the complete content: all th elements plus contents. Firefox was stripping the tags and displays only the contents.
Anyways I decided to construct every single th element and then append it to the thead utilizing the Element.update() function. But I haven't found a way to append multiple objects with this function.
The th elements look like this:
var thead_amount = new Element('th', {
'id': 'amount'
}).update('amount');
This works fine:
new Element('thead').update(thead_amount);
This outputs the same as above:
new Element('thead').update(thead_amount, thead_pdf, thead_tags, thead_date, thead_options);
This outputs '[object HTMLTableCellElement][object HTMLTableCellElement][object HTMLTableCellElement][object HTMLTableCellElement][object HTMLTableCellElement]'
new Element('thead').update(thead_amount + thead_pdf + thead_tags + thead_date + thead_options);
How can I append multiple objects with Prototype's update() function?
Thanks!