We help IT Professionals succeed at work.

xhtml iframe object to work in firefox and IE

Dada44
Dada44 asked
on
Hi all,

I'm using the code below to embed a webpage inside my webpage:
<div>
<object  data="http://www.google.com" type="text/html" style="width:516px;height:437px" standby="Information">
   <!--image-->
   <img src="descript.jpg" alt="more information" longdesc="apage.html" />
</object>
</div>

This code is great because validates w3c (xhtml strict) and wai, and works for Firefox and Safari. BUT it does not work for any version of Internet Explorer. How can I fix that?

Thanks
Comment
Watch Question

Shinesh PremrajanEngineering Manager

Commented:
Its working for me i am using IE8.0, i think since its a activex object that is called by your code, which prompts for the user to allow access[In the top you will notice a blinking text].


hope this helps

Author

Commented:
Thanks for answering shinuq, bit I've tried two PCs with IE8 and what I see is the image in:
<img src="descript.jpg" alt="more information" longdesc="apage.html" />

Anyway I need it to work in all versions of IE :(

Any ideas?

Tnaks again
Shinesh PremrajanEngineering Manager

Commented:
The object tag is partially supported by almost all the browsers
Refer this link
http://joliclic.free.fr/html/object-tag/en/object-text.html#html

How about the below code,

Hope this helps
<object  data="http://www.google.com" type="text/html" style="width:516px;height:437px" standby="Information">
   alt : <a href="apage.html">more information</a>
</object>

Open in new window

Author

Commented:
I get the alt text in Internet Explorer 6, 7 and 8, and what I need is to get Google's page  in Internet Explorer 6, 7 and 8.. how can I do that?
Thanks again
Shinesh PremrajanEngineering Manager

Commented:
how about this
<object  id="information" classid="clsid:663C8FEF-1EF9-11CF-A3DB-080036F12502"  data="http://www.google.com" type="text/html" style="width:516px;height:437px" standby="Information">
   alt : <a href="apage.html">more information</a>
</object>

Open in new window

Engineering Manager
Commented:
for me classid is not working in FF, so i have updated the code , this is working for me, both in IE8.0 & FF3.5

hope this helps
<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>

Open in new window

Author

Commented:
No mate, not working for me. The alt text and the link to apage.html in all IE versions including IE8 :((((((((((
What's happening? (emptied/cleaned cache several times)
Thanks!

Author

Commented:
It may be a browser configuration problem? Security issues or something like that?

Author

Commented:
Are you testing it locally? It works locally for me now that I'm testing? But the page containing the object code goes online, and when I upload it to my ftp, then is when I can only see the alt text and link ..
Any clues?

Author

Commented:
thanks!