We help IT Professionals succeed at work.
Get Started

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

Dada44
Dada44 asked
on
790 Views
Last Modified: 2013-12-08
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>

Open in new window

Comment
Watch Question
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE