Javascript helpers not updating table row in IE6

Trying to replace a table row with an id using both RJS templates and
normal link_to_remote :update. Neither work in IE6, fine in FF etc.

If I use the same code but target a div with an ID it works. This is
tricky as I have a table with edit buttons, when the button is pressed
that row gets updated with a partial containing a form for update. I
need this to work as II don’t fancy rewriting the whole table in CSS
with spans etc as it defeats the objective of having tabular data
displayed.

James W. wrote:

Trying to replace a table row with an id using both RJS templates and
normal link_to_remote :update. Neither work in IE6, fine in FF etc.

If I use the same code but target a div with an ID it works. This is
tricky as I have a table with edit buttons, when the button is pressed
that row gets updated with a partial containing a form for update. I
need this to work as II don’t fancy rewriting the whole table in CSS
with spans etc as it defeats the objective of having tabular data
displayed.

bump

James W. wrote:

bump

Is this useful at all?

Alex Y. wrote:

James W. wrote:

bump

Is this useful at all?

Microsoft Learn: Build skills that open doors in your career

I have been soing some tests. Its seems that the Prototype library is at
fault because if I try to use Element.update('myId, “new text”). It does
not work on the table row.

James W. wrote:

It does not work on the table row.
Did you read the page? I quote:

Note When using Dynamic HTML (DHTML) to create a document, you can
create objects and set the innerText or innerHTML property of the
object. However, because of the specific structure required by
tables, the innerText and innerHTML properties of the table and tr
objects are read-only.

This is a limitation of IE, not Prototype.

Chris H. wrote:

From the link previously posted:

**The innerText and innerHTML properties are read-only on the
trobject.

it’s not a Prototype problem.

Thanks, how silly is that. A simple thing to achieve in any browser
except IE.

From the link previously posted:

**The innerText and innerHTML properties are read-only on the
trobject.

it’s not a Prototype problem.

Chris H. wrote:

From the link previously posted:

**The innerText and innerHTML properties are read-only on the tr
object.

it’s not a Prototype problem.

If the job of Prototype is to protect the user from browser differences
(which I believe it is) then Prototype ought to handle this.

However, if it was me maintaining Prototype I would have my head firmly
in a bucket of sand at this point.


Martin Tomes
echo ‘martin at tomes x org x uk’
| sed -e ‘s/ x /./g’ -e ‘s/ at /@/’

Visit http://www.subversionary.org/