Thanks RobG - sorry about the layout - I didn't send it like it appeared. I didn't notice the missing tr tags and wouldn't have thought of the tbody + id solution.
Cheers, Bruce At 06:48 p.m. 13/02/2009, you wrote:
On Feb 13, 1:36 pm, Bruce MacKay <b.mac...@massey.ac.nz> wrote: > Hello folks, > > The code and HTML below are from a quiz editor - I have an onClick > function that fires duplicateRow to add another question box onto the > end of the table. Posted code should be formatted to be as easily read and understood as possible, yours isn't. > Firefox does what I expect to happen - it selects the last <tr> > row. IE7 and Safari, on the other hand, appear to treat the <tfoot> > as the last tr in the table. Your markup is invalid. Even allowing for accidental omission of the opening table tag, there is no tr tag in the tfoot element so you are depending on error correction - all bets are off as to the DOM structure that will result from that. > Is there a way to satisfy the interpretation of all three browsers? Yes, use valid markup. You will then discover that Firefox does what Safari and IE are doing - duplicating the last row of the tfoot (which is the last row of the table). To fix that, add tbody tags in the markup and move the table's id to the tbody. -- Rob