# Javascript helpers not updating table row in IE6

**URL:** <https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721>\
**Category:** Rails\
**Created:** [April 3, 2006, 11:31am UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721 "2006-04-03T11:31:13Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 11:31am UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/1 "2006-04-03T11:31:13Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 12:44pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/2 "2006-04-03T12:44:05Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 12:58pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/3 "2006-04-03T12:58:53Z")

</div>

James W. wrote:

> bump

Is this useful at all?

> **[Microsoft Learn: Build skills that open doors in your career](https://learn.microsoft.com/en-us/)**
>
> Gain technical skills through documentation and training, earn certifications and connect with the community

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 1:07pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/4 "2006-04-03T13:07:38Z")

</div>

Alex Y. wrote:

> James W. wrote:
> 
> > bump
> 
> Is this useful at all?
> 
> [Microsoft Learn: Build skills that open doors in your career](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.

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 1:23pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/5 "2006-04-03T13:23:52Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 2:10pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/6 "2006-04-03T14:10:53Z")

</div>

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.

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

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 1:24pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/7 "2006-04-03T13:24:02Z")

</div>

> From the link previously posted:

\*\*The _innerText_ and _innerHTML_ properties are read-only on the  
_tr_object.

it’s not a Prototype problem.

---

<div class="post-metadata">

**Author:** ![aftershock](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/8e7dd6/32.png) [@aftershock](https://www.ruby-forum.com/u/aftershock)\
**Post date:** [April 3, 2006, 2:59pm UTC](https://www.ruby-forum.com/t/javascript-helpers-not-updating-table-row-in-ie6/56721/8 "2006-04-03T14:59:55Z")

</div>

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/](http://www.subversionary.org/)
