...

View Full Version : Object vs iframe: why this code is working for IE offline and not online?



Lleoun
06-14-2010, 10:01 AM
Hi all,

I want to show a webpage inside of my page. I'd be using an iframe but it has to validate w3c XHTML 1.0 Strict and wai. So I go for object instead.

The code has to work in all modern browsers including Internet Explorer 6, 7, and 8.

And here are my tries:

Please have a look to the chunks of code below. Each is a version of code to make object work.

Using Firefox and Safari:
OFFLINE:
#1 works
#2 woks
# 3 dont work, shows: "The object can't be rendered"
#4 works

ONLINE: the same as when offline.

Using Internet Explorer:
OFFLINE (----after accepting the alert to show blocked content----):
all the versions of code work!

ONLINE:
None of the versions work!! It shows something like an empty iframe, a blank with no active scrollbars around.
And here's the problem, I need a version of the code to work online and in all browsers.

Please give me a hand here, I have to show this working very soon and I don't have a clue on what is happening.

Thanks a lot



<!-- #1 -->
<object codebase="http://www.google.com" type="text/html" data="http://www.google.com" style="width:526px;height:447px" standby="Information">
<img src="http://3dshaders.com/shaders/Earth-1tex.jpg" alt="the earth" longdesc="earth.html" />
</object>
</div>

<!-- #2 -->
<object classid="http://www.google.com" codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
<object codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
alt : <a href="apage.html">more information</a>
</object>
</object>

<!-- #3 -->
<object data="http://www.yahoo.es" classid="clsid:235336920-03F9-11CF-8FD0-00AA00686F13" type="text/html" id="editorWindow" style="width:30em;height:10em;">
<p>Sorry. The object can't be rendered .</p>
</object>

<!-- #4 -->
<object classid="clsid:235336920-03F9-11CF-8FD0-00AA00686F13" codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
<object codebase="http://www.google.com" data="http://www.google.com" type="text/html" style="width:516px;height:437px" >
alt : <a href="apage.html">more information</a>
</object>
</object>

effpeetee
06-14-2010, 11:55 AM
We need to see all your code or better still a link.

Frank

Lleoun
06-14-2010, 01:40 PM
thanks for answering effpeetee
What I'm posting is different versions of the same thing in order to make it work, and that's all the code (minus the body and html tags)
Please re-read my post, if you need any further info please let me know.
Thanks again

Kor
06-14-2010, 02:21 PM
Hi all,

I want to show a webpage inside of my page. I'd be using an iframe but it has to validate w3c XHTML 1.0 Strict
So? Never heard about the iframe to be invalidated by w3c, no matter the DTD. The <object> tag is not yet well supported by all the browsers, as far as I know.

Lleoun
06-14-2010, 03:18 PM
I thought it was supported for all browsers .. I'll go for the iframe then (It's a tag from tons of years ago, don't understand why it's not deprecated..)
Thanks a lot

Kor
06-14-2010, 03:26 PM
I thought it was supported for all browsers ..

It is supported but in different ways, according mainly to the versions.


[ ..iframe..] It's a tag from tons of years ago, don't understand why it's not deprecated..)

No reason for. Don't confound FRAME with IFRAME. Nor FRAME is deprecated, even if these days almost nobody uses FRAMES.

_Aerospace_Eng_
06-14-2010, 03:44 PM
The iframe was thrown out as being valid in strict doctypes. The object element is starting to replace it however its buggy in some browsers. IE needs to know what kind of data it is and it can only be used for local file, not external sites or urls.

Lleoun
06-14-2010, 04:22 PM
Thanks all, now it's clear as water!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum