Thank you Andrea for the solution - I'd never have gotten there.

Cheers, Bruce


At 10:05 p.m. 13/02/2008, you wrote:

On 13 Feb, 09:05, Bruce MacKay <[EMAIL PROTECTED]> wrote:
>          s=clonedRow;
>          var myString = 'showImageList'+iRowID;
>          var myString2 = 'showImageList'+iNewID;
>          var myString3 = s.replace(myString,myString2);
>
> The error message I get is s.replace is not a function.

I think that's because 's' is not a string.
try replacing the last 4 lines with this:

clonedRow.find('a[onclick^="showImageList"]').attr('onclick',
'showImageList(' + iNewID + ')');

OR, if the anchor that you're looking for is the only one in the
cloned fieldset

clonedRow.find('a').attr('onclick', 'showImageList(' + iNewID + ')');

Reply via email to