Hi,

I have this script:

<script type="text/javascript">

      function groupBox() {

            title = Builder.node("div", {className: "title"}, "Sample
Groupbox");
            content = Builder.node("div", {className: "content"}, "This is
a sample group box widget.");
            groupbox = Builder.node("div", {className: "groupbox"});

            groupbox.appendChild(title);
            groupbox.appendChild(content);

            $("my_groupbox").appendChild(groupbox);
      }
</script>

I would like to use insertion.after instead of
"$("my_groupbox").appendChild(groupbox);" to insert the DOM fragment I
created w/builder. I've tried "new Insertion.After("my_id", groupbox);",
but it doesn't work. I've also tried to use groupbox.innerHTML and while I
do get the innerHTML of the fragment to appear, I really need the whole DOM
fragment. Any ideas on how to do this?

Thanks,
Jeff

_______________________________________________
Rails-spinoffs mailing list
Rails-spinoffs@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs

Reply via email to