473,387 Members | 1,520 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

object tag as iframe

I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
strict DTD (can't use transictional).
I can load into the <object> another page, but I don't know from there (the
child page) how to access the parent window in IE.
In Firefox, using

window.parent.document.getElementById( id )

I can retrieve the <object> tag itself and other elements at the same level
(parent window) but IE return always null.
How can I do?
Thanks in advance,
Fabio
Jul 23 '05 #1
8 2854


Fabio R. wrote:
I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
strict DTD (can't use transictional).
I can load into the <object> another page, but I don't know from there (the
child page) how to access the parent window in IE.
In Firefox, using

window.parent.document.getElementById( id )

I can retrieve the <object> tag itself and other elements at the same level
(parent window) but IE return always null.
How can I do?


I think with current IE versions it is not possible to get script to
access anything outside of the object document. If you need script
communication then you need to use frames.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
On Fri, 03 Jun 2005 17:55:26 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:


Fabio R. wrote:
I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
strict DTD (can't use transictional).
I can load into the <object> another page, but I don't know from there (the
child page) how to access the parent window in IE.
In Firefox, using

window.parent.document.getElementById( id )

I can retrieve the <object> tag itself and other elements at the same level
(parent window) but IE return always null.
How can I do?


I think with current IE versions it is not possible to get script to
access anything outside of the object document. If you need script
communication then you need to use frames.


In the parent:

window.name="chicken";

in the child

myParent=window.open('','chicken');

but that's not a great solution. The solution is of course to use
IFRAME, and as it was an IE question, the OP shouldn't be using XHTML
anyway, so there's little problem...

Jim.
Jul 23 '05 #3
Fabio R. wrote:
I'm using an <object> tag to replace <iframe>, not supported in a Xhtml
strict DTD (can't use transictional).
HTML 4.01 Strict supports the `iframe' element.
I can load into the <object> another page, but I don't know from there
(the child page) how to access the parent window in IE.


IE does not support XHTML.
PointedEars
Jul 23 '05 #4
Thomas 'PointedEars' Lahn wrote:
Fabio R. wrote:
I'm using an <object> tag to replace <iframe>, not
supported in a Xhtml strict DTD (can't use transictional).


HTML 4.01 Strict supports the `iframe' element.

<snip>

No it doesn't.

Richard.
Jul 23 '05 #5
Richard Cornford wrote:
Thomas 'PointedEars' Lahn wrote:
Fabio R. wrote:
I'm using an <object> tag to replace <iframe>, not
supported in a Xhtml strict DTD (can't use transictional).

HTML 4.01 Strict supports the `iframe' element.

<snip>

No it doesn't.


Interesting. There appears to be an undocumented error in the elements
list or the DTD specification since only deprecated elements should not
be contained in Strict:

<http://www.w3.org/TR/html4/index/elements.html>
<http://www.w3.org/TR/html4/appendix/changes.html#idx-deprecated>
<http://www.w3.org/TR/html4/sgml/dtd.html>
PointedEars
Jul 23 '05 #6
Thomas 'PointedEars' Lahn <Po*********@web.de> writes:

[iframe not in HTML 4.01 Strict]
Interesting. There appears to be an undocumented error in the elements
list or the DTD specification since only deprecated elements should not
be contained in Strict:


Or maybe the list and DTD is correct, and the documentation describing
them is not. I'd say that is more likely. All things about Frames,
including IFRAME and the TARGET attribute, are not in HTML 4.01
Strict. It appears quite deliberate.

But yes, the documentation is not precise on this.

The most relevant documentation is the HTML version information
<URL:http://www.w3.org/TR/html4/struct/global.html#h-7.2>. It does
indeed say that the strict DTD includes "all elements and attributes
that are not deprecated or do not appear in frameset documents" (which
I am not sure how to parse).

If I do understand it correctly, IFRAME is not in the frameset DTD
(it's not inside a "<![ %HTML.Frameset; ["..."]]>" section), so
from the previous definition, it should be in the Strict DTD.

Since IFRAME isn't in the Strict DTD, and weren't in HTML 4 Strict
either, and nobody has considered this an error since HTML 4 became
a recommendation in 1998, I would put my money on the DTD being
correct and the documentation lacking.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 23 '05 #7


Jim Ley wrote:
On Fri, 03 Jun 2005 17:55:26 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:

I think with current IE versions it is not possible to get script to
access anything outside of the object document. If you need script
communication then you need to use frames.

In the parent:

window.name="chicken";

in the child

myParent=window.open('','chicken');

but that's not a great solution.


I tried that with IE 6 on Win XP SP 2 and it opens a new window so it
doesn't work.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #8
On Tue, 14 Jun 2005 16:06:50 +0200, Martin Honnen <ma*******@yahoo.de>
wrote:
In the parent:

window.name="chicken";

in the child

myParent=window.open('','chicken');

but that's not a great solution.


I tried that with IE 6 on Win XP SP 2 and it opens a new window so it
doesn't work.


Interesting.. it worked fine for me, although re-visiting it seems to
only work the first time, if you refresh the window containing the
object it fails, it's certainly not a reliable technique.

Jim.
Jul 23 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: chotiwallah | last post by:
this is the html: <a href="Javascript:change();">change</a> <object data="a.htm" type="text/html" width="200" height="200" id="obj"></object> and this the javascript:
7
by: Simon Strandgaard | last post by:
There are no <iframe> tag in xhtml strict, instead I should use <object>. If I change <iframe> to <object> then my javascript stops working. I am curious to how to use <object> with javascript...
9
by: Peter Jenkins | last post by:
I needed to implement a "page within a page" and rather than use frames (yecchh) decided to try using the object tag. Flung a test page together, tried it out in IE and Firefox on my PC, it...
3
by: bdogsputnik | last post by:
I'm getting the following error: brian.style is null or not an object on the following code...can anyone help? <html> <head> <script> <!-- function brianIt(){
12
by: marcadonis | last post by:
Hi! Does anybody know of a way that I can keep a reference to an object that I can then reuse? I tried various approaches using navigator, but these all fail in an iframe due to premission...
7
by: Andrew Mercer | last post by:
I am getting the above error when attempt to set the src, height and width of an iframe in C# code. I am using this as an attempt to dynamically alter the image displayed in the iframe tag of an...
1
by: tilt | last post by:
Hello, I use an object element to replace the iframe element in ie, like this: <object id="x_obj" data="http://.../" type="text/html"> <iframe name="x_if" id="x_if"...
5
by: Ketty | last post by:
Hi Experts, I am trying this bit of code which is not working right. <script language="JavaScript" type="text/JavaScript"> <!-- function showHide(divName) { var x = new getObj(divName);...
4
by: =?Utf-8?B?bWlraTc5?= | last post by:
Hi, it's possible to use a html tag object as a tag iframe. When a declare in a acsx file the tag object, i can't access to them with the codebehind C#. Visual Studio says that there is no...
1
by: John L. | last post by:
How do I invoke the scroll() method of a window object for a scrollable IFRAME element in an HTML document? I am using IE 7.0, and I thought the following would work: ...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.