Quote:
Originally Posted by acoder
No, JavaScript doesn't come with two flavours. Browsers sometimes choose not to implement standards which is where things go wrong and, more often than not, it's IE which is the culprit. There are parts of JavaScript where there are no standards at present. In that case, browsers have to come to some sort of agreement on naming, behaviour, etc.
Edit: did you mean the two different types of syntax?
Sorry you didn't get me ... ;)
Suppose this is my code ..
-
<iframe name='_name' id='_id' ... ></iframe>
-
Now i am accessing the document object of IFrame ...
-
var doc = document.getElementById('_id').contentDocument; //Mozilla
-
var doc = document.getElementById('_id').contentWindow.document //IE
-
var doc = window.frames['_name'].document; //both
-
Now my question is ..that
document.getElementById('_id') and
window.frames['_name'] refers the same object ..i mean the iIFrame window.
For one case
contentDocument or
contentWindow.document and for another case it is cimply document ..why?
This is my question ?
I think you get my question ... ;)