Whta's the Story with document.createElement('iframe') in IE?

T

Thomas 'PointedEars' Lahn

The said:
Experts are suggesting that using <iframe> is basically a bad idea
unless you have some over-riding reason that you need to use it. In
virtually all cases, there will be no such reason.

Hear, hear!


PointedEars, amused
 
S

slebetman

If you were only interested in listening to the answer you wanted to
hear, rather than learning the truth, why did you ask the question in
the first place? You knew the answer you wanted to hear from the
outset, so you were just wasting everyone's time asking the question
in a forum that would rather promote understanding stupid mystical
incantations.

The answer he was looking for was really the *official* reason why the
stupid mystical incantation in necessary in the first place which
Laurent correctly gave:

http://msdn.microsoft.com/en-us/library/ms536389.aspx

He had to ask in the newsgroup in the first place because he wasn't
even sure there IS an official reason for it much less where to LOOK
FOR IT.

So the question WAS warranted (it's not in the FAQ after all). By the
way, this so called stupid mystical incantation is necessary in IE for
other things besides iframes. It's necessary for selects, inputs and
textareas. It may be necessary for other tags as well but I've mostly
found problems with form elements. Basically, document.createElement
is b0rk in IE.
 
T

Thomas 'PointedEars' Lahn

slebetman said:
The answer he was looking for was really the *official* reason why the
stupid mystical incantation in necessary in the first place

Nonsense. Read the OP again.

That may be what you consider official, but it is nonsense nonetheless.
Turns out the vendor does not even know its own product or is incapable
of expressing its flaws properly in the documentation.
He had to ask in the newsgroup in the first place because he wasn't
even sure there IS an official reason for it much less where to LOOK
FOR IT.

This "official reason" excuse is a byproduct of your vivid imagination. The
OP asked why it was done this way, and the correct answer is that the author
of the code had no clue what they were doing. Because a reasonable
developer double-checks everything that he reads.
So the question WAS warranted (it's not in the FAQ after all).

There is no doubt about that. However, that the OP assumed that what he
read was the only correct way because a million flies already said so, was
presumptuous and turned out to be wrong.
By the way, this so called stupid mystical incantation is necessary in IE for
other things besides iframes. It's necessary for selects, inputs and
textareas. It may be necessary for other tags as well but I've mostly
found problems with form elements. Basically, document.createElement
is b0rk in IE.

You have not read or tested "Henry"'s code, have you?


PointedEars
 
H

Henry

The answer he was looking for was really the *official* reason
why the stupid mystical incantation in necessary in the first
place

The answer to that is that it is *not* necessarily. And that answer
was given, but apparently that answer, no matter its demonstrable
truth, was not the answer he was looking for.
which Laurent correctly gave:
<snip>

You cannot "correctly" give a reason for the necessity of something
that is not necessary.
He had to ask in the newsgroup in the first place because
he wasn't even sure there IS an official reason for it

But he was not interested in listening when he was told that there was
not.
much less where to LOOK FOR IT.

There can be no "where to look" for the reason for the necessity of
something that is not necessary.
So the question WAS warranted

Not if the answer was pre-determined by ill-conceived preconceptions.
(it's not in the FAQ after all).

Difficult to pot the absence of a reason for the necessity of
something into any document. But it any event it is a long way from
being a frequently asked question.
By the way, this so called stupid mystical incantation is
necessary in IE for other things besides iframes.

It is not necessary for IFRAMEs, and (unsurprisingly) also unnecessary
for anything else.
It's necessary for selects, inputs and
textareas.

In what way? IE happily creates input, select and textarea elements
for me using DOM standard element creation code. (<input type="radio">
are the only elements that need special handling as a result of IE's
characteristics, and I still use non-branching code for those).
It may be necessary for other tags as well but I've mostly
found problems with form elements.

Your finding problems with the code you write is not, in itself, a
reason to be attributing issues to the wider world.
Basically, document.createElement
is b0rk in IE.

Based on what evidence? The case of targeting links and form
submission not being as simple as it could be has nothing to do with
the - createElement -, but rather is a consequence of employing -
setAttribute - and/or assigning to the element's - name - property not
having the side effect of associating a name with the corresponding
window object in IE. Thus if anything is broken it is the assignment
to the element's - name - property and/or - setAttribute -. And here
is a reflection of my point about the quality of analysis being so
poor that people fixate on mystical inactions that never do much more
that solve issues by coincidence; you are blaming the - createElement
- method, when with the argument "IFRAME" IE's - createElement -
method does no more and no less than any other - createElement -
method (creates a IFRAME element that is not attached to a document
and has no more than default/implied properties/attributes, and
certainly no name or id).
 

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,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top