Javascript helpers not updating table row in IE6


#1

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.


#2

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


#3

James W. wrote:

bump

Is this useful at all?

http://msdn.microsoft.com/workshop/author/tables/buildtables.asp


#4

Alex Y. wrote:

James W. wrote:

bump

Is this useful at all?

http://msdn.microsoft.com/workshop/author/tables/buildtables.asp

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.


#5

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.


#6

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.


#7

From the link previously posted:

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

it’s not a Prototype problem.


#8

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/