Topic: IE error with "RJS Templates for Rails" example

Hi,

I have implemented the first part of the expense tracker in the "RJS Templates for
Rails" booklet. It works fine in Firefox, but not in IE -> when I add an expense, I get an RJS error.  Has anyone else had this happen?  The second pop-up window shows the following:

new Insertion.bottom("expenses", "<tr id=\"expense-6\">
  <td>Bottle of Wine</td>
  <td class=\"amount\">19.95</td>
</tr>");
new Effect.Highlight("expense-6",{});
Form.reset("expense-form");

I don't know what IE's complaining about, as the DOM ids are all setup as per the book example (plus it does work in Firefox!).  Any idea why this would be happening?

Ta

Re: IE error with "RJS Templates for Rails" example

I seem to recall there being issues with IE and manipulating table rows.

What is the error you are receiving?

Re: IE error with "RJS Templates for Rails" example

You can't set innerHTML on a table like that unfortunately. You'll have to replace the entire table if you want to do it with innerHTML and have it work in IE.

Or you can add a row through the DOM or by adding to the table's .rows[] and the row's .cells[] wink

vinnie - rails forum admin