Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > HTML > HTML Code Clinic
|
HTML Code Clinic Do you have some HTML code you'd like to share and get suggestions from others for tweaking or improving it? This discussion is the place.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the HTML Code Clinic section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 30th, 2007, 07:20 AM
Authorized User
 
Join Date: Aug 2004
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default <OBJECT> tag in IE doesn't work

I'm trying to display another website within my site using the Object tag. Here is the code.

<object type="text/html" name="website" data="http://www.mywebsite.com" width="300" height="300">
<embed src="http://www.mywebsite.com" width="300" height="300">
</embed> Error: Embedded data could not be displayed. </object>

This works great in Firefox but in IE7 all I get is a blank text area.
 Any ideas or alternatives?
 
Old August 30th, 2007, 11:36 AM
Friend of Wrox
 
Join Date: Jun 2007
Posts: 477
Thanks: 10
Thanked 19 Times in 18 Posts
Default

I've never embedded a website before, but I know Flash movies have to implemented in two different ways (just like AJAX) because IE and FF have completely different ways of handling it.

For IE You insert <object> tags like this...

Code:
<object attributes="blahblahNotRelevantToYou">
   <param attribute="something">
   <param attribute="something">
   <param attribute="something">
   <param attribute="something">
</object>
And it's the parameters that define everything for IE, and I think that's what you may be missing. Again, for Flash you then insert at the end of the param tags an <embed> with all the info (yes, a second time just for FF).


Code:
<object attributes="blahblahNotRelevantToYou">
   <param attribute="something">
   <param attribute="something">
   <param attribute="something">
   <param attribute="something">
   <embed attributes="OhMyGoshALotOfAttributesAndValuesInOneBigLongMess" />
</object>
And it sounds like you have the same issue. FF works because it's getting the info from the embed tag, but IE requires valid (X)HTML for this (the W3C considers this an illegal use of the embed tag). So IE requires everything set a second time in the param tags.

-------------------------

Whatever you can do or dream you can, begin it. Boldness has genius, power and magic in it. Begin it now.
-Johann von Goethe

When Two Hearts Race... Both Win.
-Dove Chocolate Wrapper

Chroniclemaster1, Founder of www.EarthChronicle.com
A Growing History of our Planet, by our Planet, for our Planet.





Similar Threads
Thread Thread Starter Forum Replies Last Post
<a> tag in XML sani723 XSLT 5 March 27th, 2007 04:16 AM
Problem with <span> tag tclotworthy XSLT 2 February 18th, 2007 03:48 PM
dynamic <input> tag Val Javascript 1 September 6th, 2006 02:55 AM
<Form> tag within <form> tag rit01 ASP.NET 2.0 Basics 3 April 23rd, 2006 08:12 AM
Using Java Applets and the <object> tag Alexpizzoferro HTML Code Clinic 5 May 25th, 2004 07:55 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.