Prototype This page is part of the Prototype JavaScript framework documentation.
Overview | (...)

Insertion.Bottom takes two parameters, the content to be inserted and the id of the element to which this content will be appended.
Insertion.Bottom inserts text (or a HTML snipet) as a last child of element.

Syntax


  new Insertion.Bottom(element, content);

element can be any DOM Element object or ID.

content can be either text or HTML snipet.

Example


<p>
   <a href="#" onclick="new Insertion.Bottom('mylist', '<li>Yet another list item!</li>'); return false;">
      Add another list item!
   </a>
</p>

<ul id="mylist">
   <li>a list item.</li>
   <li>another list item.</li>
</ul>

creates:

Add another list item!

Possible issue with IE6

There seems to issues with appending <tr> (table rows) in IE6. See the following links for more on this topic and potential workarounds/hacks.