Sorry, I forget to write de prototype version I use. This is the 1.6.0.3. My test is on IE 7. firstRow and response are good.
I will continue to investigate the issue... On 23 mar, 11:47, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > Hi, > > Internet Explorer can be difficult about adding to tables using > strings, but the current version of Prototype (1.6.0.3) has code to > deal with it for you. Are you using 1.6.0.3? If I have a table with > a row in it with the id "rowbefore", this code works fine for me on > IE7: > > $('rowbefore').insert({ > before: '<tr><td>Blah</td><td>Blah</td></tr>' > }); > > (I can't test IE6 at the mo.) It works because Element#insert > actually creates a temporary table for you, then grabs the rows and > moves them into your target table. I don't know when that code made > it into the codebase, but again it's there in 1.6.0.3. > > Alternately, are you absolutely sure that by the time you get to this > line: > > > firstRow.insert({before: response}) > > ...that A) 'firstRow ' really is a reference to a row in the table, > and B) 'response' really is a string with a valid row in it? > > HTH, > -- > T.J. Crowder > tj / crowder software / com > Independent Software Engineer, consulting services available > > On Mar 23, 10:12 am, djice <jcjabouille...@gmail.com> wrote: > > > Hi, > > > I use an Ajax request for posting my form. The response of this > > request is a string which contains HTML "<tr id="111"><td>....</ > > td><td>......</td></tr>". This html represents a row of a <table>, my > > goal is to add this row to my table. So I use this code: > > > firstRow = $('msg'+colorIndicator); > > response = xhr.responseText; > > firstRow.insert({before: response}) > > > $firstRow if the first row of my table. $responde is my ajax response > > "<tr id="111"><td>....</td><td>......</td></tr>". > > > This code works on Firefox but not on IE. When I try this on IE, there > > is no javascript error message and the javascript code following is > > not executed. Nothing appends... > > > What is the issue ? The fix ? Is it an official bug ? > > > Maybe $response has to be a javascript object instead of a string ? > > > Thanks for your help, > > > djice --~--~---------~--~----~------------~-------~--~----~ 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 prototype-scriptaculous+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en -~----------~----~----~----~------~----~------~--~---