Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Make <object> link to external web page work in IE7?
Old 02-01-2010, 11:52 AM Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
I currently have a blog site embedded into a fixed-size <div> on another web page using an iframe. In order to migrate the site from XHTML Transitional to Strict I need to ditch the iframe, and so far as I can tell I should be using an <object> element to do the same task.

Problem is, this sample code:

Code:
<div id="object_window" style="left: 20px; top: 100px; width: 930px; height: 650px;">

 <object id="page_to_show" type="text/html" data="http://www.google.com"
style="height:100%; width:100%;">
<p>Alternate text.</p>
</object>

 </div>
works a treat in FF but IE7 just delivers an empty box (not even the alt text). Is there a work-around that's still Strict compliant?

(Yes, I know the style stuff belongs in a style sheet, I was trying to make an example that was easy to post here )

Thanks in advance!
Spinland is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-01-2010, 11:56 AM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
And why does it need to be XHTML strict?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-01-2010, 11:59 AM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
Because that's the standard I've been learning now, and I'd like to expand my ability to encompass this existing site. If it can't be done, all well and good, but if it's possible I'd like to learn how.
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-01-2010, 12:09 PM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Nothing to stop you coding as strict and using a transitional DTD.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-01-2010, 06:53 PM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
So there's no way to make it work without using iframes?
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-01-2010, 06:59 PM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
It's what Iframes are supposed to be for.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-01-2010, 07:04 PM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
But "transitional" is just that: a temporary phase as you transition to the correct, "Strict" compliance with the standard. That means iframes are going away. If I didn't care whether I were using a Transitional or a Strict DTD I wouldn't have broached the question.

I wasn't looking for a philosophical debate on whether it's worthwhile to adhere to the Strict standard, I was asking a technical question about whether this were possible within that standard.

Thank you in advance.
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-01-2010, 07:15 PM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Then use an appropriate DTD and have a FRAMESET DTD.

Do you HAVE to use XHTML or is it just the "designer snobbery"?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-01-2010, 07:26 PM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
I'm sorry, I was under the impression this was a forum for finding technical help with HTML issues, not for airing personal agendas and catching grief for asking. I seem to have stumbled across your personal cabbage patch, instead.

I'll take my questions elsewhere. Thanks anyway.
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-01-2010, 07:42 PM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
I don't have any personal agenda just trying to work out why you are creating problems for yourself.

Because of the wide variations in browser compatibility sometimes you have to accept things cannot be done the way you want.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-01-2010, 08:55 PM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
Okay, in the probably-unlikely reason anyone out there cares about writing code in compliance with XHTML Strict (if this doesn't apply to you then please read no further, there's nothing here to interest you), there is a workaround to make <object> work mostly as it's supposed to in IE, but the page you're linking in cannot be on a remote server.

Let's assume you want to bring in a Wordpress blog installed in a folder off your site's root called my_blog_folder. This is the code to make it appear:

Code:
<!--[if IE]> 
    <object classid="clsid:25336920-03F9-11CF-8FD0-00AA00686F13" type="text/html"
        data="my_blog_folder/index.php" style="width:100%;height:100%;">
        <p>Please tell the webmaster you saw this, something is wrong.</p>
    </object>
 <![endif]-->
 <!--[if !IE]><-->
    <object type="text/html" data="my_blog_folder/index.php" style="width:100%;height:100%;">
        <p>Please tell the webmaster you saw this, something is wrong.</p>
    </object>
<!--><![endif]-->
Wrap this in a <div> block styled to the location and size you want the blog to use, and it will create scroll bars as necessary. For further correctness the style elements above could be moved into your CSS sheet quite easily, of course. Since they merely assert 100% of what's already defined in your style sheet their inclusion in the HTML can be a grey area.

Of course you can get the exact appearance and behavior using iframes, but please remember: all along I stipulated HTML Strict compliance. If you don't care about that, then please just move along without comment and leave this thread to those who do care about such things.

Thanks for looking.
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-02-2010, 04:12 AM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
but the page you're linking in cannot be on a remote server.
Correct!

NOW do you get my point about what iframes are for?

I do write valid code BUT I care more about SEMANTIC CODE!
That is, using elements for the purpose they are intended.

For the sake of sanity there are times when compromises are required, just because you may switch to a "loose" specification when needed, does not mean that every body is going to make fun of your lack of principles.

Strictly speaking, unless your pages make use of XML/XLST you should be using a HTML4.01 specification.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-02-2010, 05:43 AM Re: Make <object> link to external web page work in IE7?
Average Talker

Posts: 16
Name: Mark Dyson
Trades: 0
For those who believe in adhering to the most current standard and only resorting to outmoded, deprecated elements as a last resort...

There is a very real benefit to avoiding iframes if possible: content brought in via <object> is supported by mobility browsers such as the Blackberry's, whereas iframes are not. I personally maintain at least one site where that distinction is about to make my life much easier, and my Blackberry-wielding users happier.

The only down side to <object> content is Microsoft's failure to code their browser properly to conform to standards (<object> works exactly as it is supposed to, and eliminates the need for deprecated elements, in all other browsers that matter), and it may even one day be possible that they wake up and correct their errors.
Spinland is offline
Reply With Quote
View Public Profile
 
Old 02-02-2010, 05:59 AM Re: Make <object> link to external web page work in IE7?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,382
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Actually until HTML5 reaches recommended status, HTML 4.01 IS the current standard for HTML markup code.
XHTML is NOT the "latest version" of HTML.

So where is the iframe deprecated? other than in a non-frameset DTD of course.
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Make <object> link to external web page work in IE7?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.26228 seconds with 12 queries