On Aug 17, 4:30 am, "Erik Beeson" <[EMAIL PROTECTED]> wrote: > Actually, technically, what I suggested wastes the original node since > it never gets inserted, just cloned. Maybe this would be slightly > better: > > function MakeEmailField(n) { > var $inputBox = $('<input>').attr("type", "text"); > for(var i = 1; i < n; i++) { > $inputBox.clone().attr("id","email"+i).appendTo('#myForm'); > } > $inputBox.attr("id","email"+n).appendTo('#myForm'); > } > > Noticed the loop starting value is different. This way, the cloning > only happens if you want more than one, which is a little more > efficient.
Ahhh. I see. Somewhat "Obstrusive" but I see the reasoning. <g> I will definitely save your notes here. Thanks -- HLS