It ain't pretty, but it works :-) http://paste.pocoo.org/show/87509/
On Oct 9, 8:46 am, Martin Sarsini <[EMAIL PROTECTED]> wrote: > Unfortunately it is not that simple. > With your code it simply replaces the id of the fieldset, when I need > that it will go and replace the id of each id and name element of each > form > here is part of my code > > <fieldset id="workfieldset_0"> > <div> > <label for="placeofwork_0">Place of work</label> > <input type="text" id="placeofwork_0" name="placeofwork[0]" > value="" /> > </div> > > <div> > <label for="city_0">City / Town</label> > <input type="text" id="city_0" name="city[0]" value="" /> > </div> > ...... > > So I need first of all that each name keeps the same value but > different key value (ie placeofwork[0] becomes placeofwork[1] and > city[0] becomes city[1] etc...) > once I understand how I can make it work I can apply the same > replacing method to the id of the inputs and to the for of the labels > > On Oct 9, 12:57 pm, Vic <[EMAIL PROTECTED]> wrote: > > > What about this: > > > $(fromClone).attr("id", newId); > > or > > $(fromClone).attr("name", newName);