[jQuery] Re: update input name

2007-06-07 Thread oscar esp
:-( Same result... if I inspect the name property using jquery("newdivetc") is updated howere the html is not updated On 6 jun, 15:19, Sam Collett <[EMAIL PROTECTED]> wrote: > On Jun 6, 8:50 am,oscaresp<[EMAIL PROTECTED]> wrote: > > > Thnaks... I have tryed: > > > jQuery("#"+inputID,add

[jQuery] Re: update input name

2007-06-06 Thread Sam Collett
On Jun 6, 8:50 am, oscar esp <[EMAIL PROTECTED]> wrote: > Thnaks... I have tryed: > > jQuery("#"+inputID,addedItem).attr("id",newInputID); > content1= jQuery("#"+newInputID,addedItem)[0].outerHTML > content1=content1.replace(inputID,newInputID) > jQuery("#"+newInputID,addedItem)[0].outerHTML = con

[jQuery] Re: update input name

2007-06-06 Thread oscar esp
Thnaks... I have tryed: jQuery("#"+inputID,addedItem).attr("id",newInputID); content1= jQuery("#"+newInputID,addedItem)[0].outerHTML content1=content1.replace(inputID,newInputID) jQuery("#"+newInputID,addedItem)[0].outerHTML = content1 But any result My use case: I have a div with inputs ,

[jQuery] Re: update input name

2007-06-04 Thread Jörn Zaefferer
oscar esp wrote: I have a code to clone a input. After that I need to change the id and name it... seems that change id works fine but not the name: jQuery("#"+inputID,addedItem).attr("id",newInputID); -> works ok jQuery("#"+inputID,addedItem).attr("name",newInputID); -> seems doesn't work

[jQuery] Re: update input name

2007-06-04 Thread MikeR
$('#one').attr({ 'name': 'two', 'id': 'two' }); On Jun 4, 8:24 am, oscar esp <[EMAIL PROTECTED]> wrote: > Sorry I did a mistake when I copied te code. I have the code like > > jQuery("#"+inputID,addedItem).attr("id",newInputID); -> works ok > jQuery("#"+newInputID,addedItem).attr("name",newInput

[jQuery] Re: update input name

2007-06-04 Thread oscar esp
Sorry I did a mistake when I copied te code. I have the code like jQuery("#"+inputID,addedItem).attr("id",newInputID); -> works ok jQuery("#"+newInputID,addedItem).attr("name",newInputID); -> doens't work On 4 jun, 13:25, arnaud sellenet <[EMAIL PROTECTED]> wrote: > If your code is exactl

[jQuery] Re: update input name

2007-06-04 Thread arnaud sellenet
If your code is exactly that (the two lines one after the other), this is normal the second one does not work, as $("#"+inputID) does not exist anymore... Did you try this : jQuery("#"+inputID,addedItem).attr("id",newInputID); jQuery("#"+newinputID,addedItem).attr("name",newInputID); or