[Javascript] innerHTML
Troy III Ajnej
trojani2000 at hotmail.com
Fri Feb 3 10:43:20 CST 2006
As I remeber Peter-Paul Koch, started building 'quirksmode.org' few years
ago and I believe he is still a member of this forum. So he might also give
you some feedback on this digg, (he is obligated to do so), because that
nonsense apeared in his website.
I also recall that, the innerText & innerHTML were invented, introduced and
implemented by IE guys first time in IExplorer 4.01. while XHTML was rather
more tallked about than worked about.
>Here are a couple articles about IE's buggy handling of innerHTML:
>
>http://www.quirksmode.org/bugreports/archives/2004/11/ innerhtml_and_t.html
I never saw a single error on IE's behaviour once or ever at this report.
Did you?! Where!
It is well known that <pre>s, do not neglect whitespaces and newlines. But
even a yesterday novice is completely aware of the fact that HTML does. If
you pass content containing whitespaces and newlines throught innerHTML,
-than no matter if it's passed inside the <pre> or a textbox, -there should
not be any kind of extra whitespaces nor new lines, because if there would
be, it would proove that IE is really missinterpreting its own instuctions.
Should I emphasize?
The guy Sebastian Redl is tallking nonsense! Where did he learn that html
should be passed as plain text?
He also invented that <pre>'s should contain format like fi <B><I> etc, but
that dummy IE doesn't allow that.
If you want to paste (preserved as typed) text content inside a PRE tag, you
should use innerText property.
Seems to me that other browsers that "half" implemented this feature are not
cappable of handling it properly. They should have implemented the other
half also. The innerText! Other browser developers came to conclusion that
implementin innerHTML only will suffice, so there is no need to implement
innerText also. This case proves them to be wrong.
This false fault is actually given at this page:
http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
cant see the woods from trees I gues. what mention? what normalization?
innerHTML is naturally to be treated as html code not a plain tex string.
-Or is it?!!!
>http://www.quirksmode.org/blog/archives/2005/12/xmlhttp_notes_c.html
>[scroll to "Explorer - responseText and forms"]
As for this one; it's obvius that he made a logicall mistake therefore a
scripting mistake too. It has to be a slight data-type missmatch. But since
other browsers are less intelligent and can't tell a crow from a chicken,
they eat it, stay happy and never argue.
the proverb:
Instead of bllaming it to the Manson, stik to the standards.
I hate Internet Explorer, therefore I'm COOL!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Troy III
progressive art enterprise
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>On Feb 1, 2006, at 11:32 AM, Paul Novitski wrote:
>
>
>>Basically, I inserted HTML markup into a div and found that the div's
>>firstChild and hasChildNodes came back null. I tried walking the DOM
>>using getElementsByTagName("*") and couldn't find the tags I had just
>>inserted, even though the inserted markup was rendered by the browser
>>just fine.
I wonder what procedure have you followed here practically?! What browser
version are you using. 'Cause IE, on top of all, gives you the extensive
options to even retrieve elements added on fly by index. In some casses it
is possible to receive greater than real number of children if you used a
closing tag where not required. But not null!
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
More information about the Javascript
mailing list