Saturday, June 02, 2007

IE's Unknown Runtime Error in prototype.js Line: 697 Char: 9

IE sucks again! Without a decent debugger (like Firebug), I have to read prototype.js (version: 1.4.0_pre11) and spend hours trying to pinpoint the fault. This alien error appears to be this block:

    if (receiver) {
if (this.options.insertion) {
new this.options.insertion(receiver, response);
} else {
receiver.innerHTML = response;

Particularly this line:

receiver.innerHTML = response;

I am trying to rewrite a tbody of a table but IE does not like that. This link is insightful (RobG):

...don't use innerHTML to modify tbody, tr, th or td elements, use DOM (they actually refer to a 'table object model', but DOM is a better bet).

If you are going to use innerHTML near a table, write the entire table or just cell content, no in between.

1 comment:

vipin said...

This is very good post. It helps me to solve the my issue.