Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><strong>Edit</strong></p> <p>It just jumped out at me that you are adding "TH" elements to a "THEAD". This is bad! A THEAD should contain only TR's. TR's can contain TH's, but if you're using THEAD I would use TD's instead.</p> <p>Remember: tbody, thead, and tfoot are subdivisions of table, and <em>must</em> contain tr elements. You should not put td or th elements directly into these, as the results are unpredictable at best.</p> <p><strong>End Edit</strong></p> <p>The problem here is that Element.update() has to be passed a string, HTML snippet, or a javascript object that implements toString (e.g. Element). However, Element does not support the '+' operator as you are using it, and adds together the object names as you see. You would have to explicitly call the toString method on each child as such:</p> <pre><code>new Element('thead').update(thead_amount.toString() + thead_pdf.toString() + thead_tags.toString() + thead_date.toString() + thead_options.toString()); </code></pre> <p>If you are using script.aculo.us in your app (a Prototype extension), you can use the Builder class to assist in easier Element construction. It provides a much more intuitive interface, especially when creating large numbers of Elements. Here is an example:</p> <pre><code>var table = Builder.node('table', { width: '100%', cellpadding: '2', cellspacing: '0', border: '0' }); var tbody = Builder.node('tbody'), tr = Builder.node('tr', { className: 'header' }), td = Builder.node('td', [Builder.node('strong', 'Category')]); tr.appendChild(td); tbody.appendChild(tr); table.appendChild(tbody); $('divCat').appendChild(table); </code></pre> <p>Check out <a href="http://wiki.github.com/madrobby/scriptaculous/builder" rel="nofollow noreferrer">http://wiki.github.com/madrobby/scriptaculous/builder</a> for details. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload