Sorry that I gave you not enough coding. Actually , you are right. I want to put "<li>" inside this "<div id=log></div>". I have changed it to <ul id=log></ul> and it is just working fine!!!
Thanks T.J. On Jul 7, 2:44 pm, "T.J. Crowder" <t...@crowdersoftware.com> wrote: > On Jul 7, 7:22 am, KingKong99 <k0818069...@gmail.com> wrote: > > > very simple code > > > li_date = "<li>hello</li>"; > > $('log').innerHTML = li_date; > > > it works very fine in all browsers but not in IE8 "Unknow runtime error" > > You'll have to give people a bit more to go on than that. What kind of > element is "log", for instance? > > "Unknown runtime error" is usually IE's way of saying you're trying to > do something odd with the DOM. For instance, what you're doing there > is setting the *entire content* of the "log" element (whatever that > is) to be an `li` element; the end result is that any content in "log" > is removed and it will have a single child, the `li` element. You can > only do that if "log" is an `ol` or a `ul`, since those are the only > things that can directly contain `li`. > > I was surprised to find that IE was okay with it if "log" was a `div` > (it's invalid, but IE and other browsers apparently work around it), > but I was able to get IE to throw the error if I tried to do that when > "log" was an `li` or `p` element (and I'm sure it would with many > others). It works fine if "log" is a `ul`. Here's the test > case:http://jsbin.com/ijelah/3 > > So basically, I think the problem is that you're trying to put an `li` > inside something that can't have an `li` inside it. > > HTH, > -- > T.J. Crowder > Independent Software Engineer > tj / crowder software / com > www / crowder software / com -- You received this message because you are subscribed to the Google Groups "Prototype & script.aculo.us" group. To post to this group, send email to prototype-scriptaculous@googlegroups.com. To unsubscribe from this group, send email to prototype-scriptaculous+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/prototype-scriptaculous?hl=en.