innerHTML doesn't work on IE?

B

beegee

In addition, assigning the returned object reference to a variable or
another property would also prevent the object from being
garbage-collected.  

Yeah, that's better. Now take a crack at this one:
"The browser" does not even "know" that it is there.

I think you made this up. I can certainly successfully retrieve the
element via document.getElementById() right after I create it whether
its attached to the DOM tree or not.

Bah. I'm done here. We could trade opinions all night and day.


Bob
 
T

Thomas 'PointedEars' Lahn

beegee said:
Yeah, that's better.

Better than what? You seem to have fallen victim to the delusion that I
would need to prove or explain anything here, especially to you.
Now take a crack at this one:


I think you made this up.

I really don't care what you think as you are obviously ignorant of the most
simple basics, how object references work in the languages that we are
discussing here; let alone of the more elaborate part, how the W3C DOM API
works.

JFTR: The use of an API function in order to create an object (and return a
reference to it) (here: Document::createElement()) does not necessitate
registration of that object anywhere. Even if so, that object would not
yet be part of the data structure relevant here, the document tree, because
the API function simply is lacking information about where to insert it.

And if you cared to read the Spec instead of indulging in your fantasies,
you would have known:

<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-2141741547>
<http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-184E7107>
I can certainly successfully retrieve the element via
document.getElementById() right after I create it whether
its attached to the DOM tree or not.

You are welcome to try and fail:

var div = document.createElement("div");
div.id = "foo";

// null (in Firefox 3.0.5/Linux)
console.log(document.getElementById("foo"));
Bah. I'm done here. We could trade opinions all night and day.

It's not just opinions, though. I am stating facts or at least very
probable circumstances, given the documentation, while you are telling
about what you are capable of imagining.


Score adjusted

PointedEars
 
D

Dr J R Stockton

In comp.lang.javascript message <3f55131a-7f1e-417c-88c2-716d32094388@v5
g2000prm.googlegroups.com>, Thu, 15 Jan 2009 03:59:11, Jorge
But I've got no way to test it in IE6/7,

Round here, the Public Library offers free Web access using PC & IE; do
you not have similar facilities wherever it is that you live?
 
J

Jorge

In comp.lang.javascript message <3f55131a-7f1e-417c-88c2-716d32094388@v5
g2000prm.googlegroups.com>, Thu, 15 Jan 2009 03:59:11, Jorge


Round here, the Public Library offers free Web access using PC & IE; do
you not have similar facilities wherever it is that you live?

Oh, well. Yes, most likely. Still, there's another reason:

:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,779
Messages
2,569,606
Members
45,239
Latest member
Alex Young

Latest Threads

Top