IE8 - unknown run time error:

136 views
Skip to first unread message

BVLS

unread,
Oct 26, 2009, 6:10:27 PM10/26/09
to MooTools Users
Hi,

I am using moo1.2.4 (core and more):
In FF3.5 it works great.

But in IE8, it gives Unknown Run time error - pointing to the
Element.Properties.html in moo1.2.4 source code.

In the old postings, and to my experience, it is set('html'," ")....
which is creating this problem..and as per the code, already its
patched with a wrapper of 'div'.
Still I am getting this problem..
Could some one let me know how to get around this problem.

Okay my source code and testing is :
http://www.parisodhana.com/sgmpv92
login as guest, password : guest123
and use the Edit button pl. of Abstract section and below.

Thank you in anticipation.
IE8 it fails, FF it works great.

************************************************************************
Element.Properties.html = (function(){
var wrapper = document.createElement('div');

var translations = {
table: [1, '<table>', '</table>'],
select: [1, '<select>', '</select>'],
tbody: [2, '<table><tbody>', '</tbody></table>'],
tr: [3, '<table><tbody><tr>', '</tr></tbody></table>']
};
translations.thead = translations.tfoot = translations.tbody;

var html = {
set: function(){
var html = Array.flatten(arguments).join('');
var wrap = Browser.Engine.trident && translations[this.get('tag')];
alert('moo src '+this.get('tag'));
if (wrap){
var first = wrapper;
first.innerHTML = wrap[1] + html + wrap[2];
for (var i = wrap[0]; i--;) first = first.firstChild;
this.empty().adopt(first.childNodes);
} else {

this.innerHTML = html; // this is the error
}
}
};

html.erase = html.set;

return html;
})();

Dimitar Christoff

unread,
Oct 27, 2009, 7:26:45 AM10/27/09
to mootool...@googlegroups.com
this is a known ie panic when doing something to innerHTML that messes
up its apprehension of the DOM if i remember correctly.

just google for "unknown runtime error innerhtml"

http://piecesofrakesh.blogspot.com/2007/02/ies-unknown-runtime-error-when-using.html

Regards,
--
Dimitar Christoff <chri...@gmail.com> - http://fragged.org/

Fábio M. Costa

unread,
Oct 27, 2009, 7:44:47 AM10/27/09
to mootool...@googlegroups.com
hmm thats new to me, nice catch.
I think we could have a try/catch around el.innerHTML = 'value' and try to do some other thing if it catches something.
It can be adressed to 2.0.
Can you create a ticket?


--
Fábio Miranda Costa
Solucione Sistemas
Engenheiro de interface

BVLS

unread,
Nov 2, 2009, 10:55:03 AM11/2/09
to MooTools Users
The above problem I got it fixed by changing the '<P>' element to
'<DIV>'.
However, if this get around is a good one or not I dont know.

The <p> element is what transforms into an RTE in my code 'after
clicking'.

Thank you very much for the help.
Prasad.




On Oct 27, 3:44 am, Fábio M. Costa <fabiomco...@gmail.com> wrote:
> hmm thats new to me, nice catch.
> I think we could have a try/catch around el.innerHTML = 'value' and try to
> do some other thing if it catches something.
> It can be adressed to 2.0.
> Can you create a ticket?
>
> --
> Fábio Miranda Costa
> Solucione Sistemas
> Engenheiro de interface
>
> On Tue, Oct 27, 2009 at 9:26 AM, Dimitar Christoff <christ...@gmail.com>wrote:
>
>
>
> > this is a known ie panic when doing something to innerHTML that messes
> > up its apprehension of the DOM if i remember correctly.
>
> > just google for "unknown runtime error innerhtml"
>
> >http://piecesofrakesh.blogspot.com/2007/02/ies-unknown-runtime-error-...
>
> > Regards,
> > --
> > Dimitar Christoff <christ...@gmail.com> -http://fragged.org/
Reply all
Reply to author
Forward
0 new messages