Thanks kangax, Element#insert is not appropriate because im not adding to the table im replacing a whole row which is indexed with controls to facilitate editing of the data that was in that position, however, in another similar situation I've had to clear the tbody section loop through a json object and replace the relevant row with the controls and data which ofcourse is "time consuming" but sure works; im trying to get a simpler way to doing this.
Element.replace(trID, tr) results in prototype error on line 1600 element.parentNode.replaceChild(content, element) => element is null tr -> row with controls trID -> row to be editied Any way out? Jason On Fri, Nov 21, 2008 at 7:40 PM, kangax <[EMAIL PROTECTED]> wrote: > > On Nov 21, 4:28 am, "jason maina" <[EMAIL PROTECTED]> wrote: > > [code] > > $('tableID').down('tbody').replaceChild(trID, tr) > > > > error: > > uncaught exception:[Exception... "Could not convert JavaScript argument > arg > > 1 [nsIDOMHTMLTableSectioElement.replaceChild]" nresult:"0x80570009 > > (NS_XPC_BAD_CONVERT_JS)" location:"JS frame :: > http://projectpath/myfile.js::flirtFert :: on line 1108" data: no] > > > > flirtFert code: > > > > http://pastie.org/320439 > > > > What could I be missing? > > Have you tried using `Element#insert` (instead of `appendChild`)? > I believe it works around some of the table deficiencies. > > > > > Regards > > Jason > > [...] > > -- > kangax > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---