Each .append() expects a complete (and best if valid) element. So where you've got .append("<span>") near the beginning of your chain, and .append("</span>") near the end, you need .append("<span></span") or .append("<span/>") just near the beginning.
Each append on the chain will append a complete element, so if you need to append multiple nested elements in one go, better to build a simple string and append that. Like so: $new.append("<div><fieldset></fieldset></div>") Note: I changed your span to a div since its not valid for a span to contain a fieldset. - Richard On Thu, Jul 10, 2008 at 7:35 PM, paceman <[EMAIL PROTECTED]> wrote: > > Any idea why the following chain does not work in IE6, but works in > Firefox: > > $new.append("<span>").children().attr("class", > "folder").append("<fieldset>").children().load("?leaf_type=" + > leaf_type, function () { > $(this).parent().find("#addtreeform").ajaxForm(add_options); > }).append("</fieldset>").append("</span>").append("</li>"); > > where $new is a JQuery object. IE6 does not report a Javascript > error, but the load is not performed. > > I solved it by having the Server do most of it, shortening the JQuery > to: > $new.load("?leaf_type=" + leaf_type, function () { > $(this).parent().find("#addtreeform").ajaxForm(add_options); > }).append("</fieldset>").append("</span>").append("</li>"); > > I assume the problem must be somewhere between (including) the > append() at the beginning to the load(). I thought JQuery works the > same in both Firefox and IE? > > Thanks in advance. >