By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,493 Members | 1,936 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,493 IT Pros & Developers. It's quick & easy.

Need help using OBJECT tag

P: n/a
The following file, as far as I know, should work. However, I get a
blank page. Using IE 7

"test2.html" is a simple file which has nothing more than "Goodbye
World" in it.

Am I doing something wrong? If so, what? If not, why doesn't this
work for me? I've also tried it using an absolute path for test2.html
- makes no difference.

Thank you!

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title></title>

</head>
<body>
<object data="test2.html" standby="Please standby...Loading Text">
Alternate Content
</object>
</body>
</html>

Apr 5 '07 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Dudely <ab****@gmail.comwrote:
news: 11**********************@q75g2000hsh.googlegroups. com
The following file, as far as I know, should work. However, I get a
blank page. Using IE 7
[snip]
Am I doing something wrong? If so, what? If not, why doesn't this
work for me? I've also tried it using an absolute path for test2.html
- makes no difference.
[snip]
<object data="test2.html" standby="Please standby...Loading Text">
Alternate Content
</object>
[snip]

Give the object a width and height.
--
BootNic Thursday, April 05, 2007 12:31 AM

My problem lies in reconciling my gross habits with my net income.
*Errol Flynn*

Apr 5 '07 #2

P: n/a
Scripsit BootNic:
Give the object a width and height.
Explanation: IE uses default width and height of 0 for an <objectelement.
(If you use CSS to set a border on the element, you'll see that the element
is there, just with empty content and zero dimensions, when you don't set
the dimensions.) Long ago it was debated whether this is a bug or just an
awfully awful feature.

You can set the width in a percentage or as a pure number (interpreted as
pixels) in CSS. You can then correct the dimensions in CSS using other, more
suitable units like the em unit.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 5 '07 #3

P: n/a
Thank you to both of you. That works. However, I notice it includes
a scrollbar. How can I turn that off?

Thanks again!

On Apr 5, 12:33 am, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit BootNic:
Give the object a width and height.

Explanation: IE uses default width and height of 0 for an <objectelement.
(If you use CSS to set a border on the element, you'll see that the element
is there, just with empty content and zero dimensions, when you don't set
the dimensions.) Long ago it was debated whether this is a bug or just an
awfully awful feature.

You can set the width in a percentage or as a pure number (interpreted as
pixels) in CSS. You can then correct the dimensions in CSS using other, more
suitable units like the em unit.

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/

Apr 5 '07 #4

P: n/a
Scripsit Dudely:
Thank you to both of you. That works.
You're welcome. Now please learn to quote on Usenet: quote the relevant
sentence or two _before_ your own message.
However, I notice it includes
a scrollbar. How can I turn that off?
Perhaps you can't. But you can suggest omission of the scrollbars by setting
body { overflow: hidden; }
in a stylesheet for the _embedded_ document. Before doing so, think about
the consequences: such a setting would procrustinate the content if it
doesn't fit, and can you really know whether it fits?

P.S. I'm afraid you're using <objectas a method of including an HTML
document in another. Though successful to a fairly limited degree, that's
not the right approach; use server-side includes, preprocessing, or just
redesign the site so that you don't need such inclusion.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 5 '07 #5

P: n/a
On 4 Apr 2007 16:59:53 -0700, "Dudely" <ab****@gmail.comwrote:
>The following file, as far as I know, should work. However, I get a
blank page. Using IE 7

"test2.html" is a simple file which has nothing more than "Goodbye
World" in it.

Am I doing something wrong? If so, what? If not, why doesn't this
work for me? I've also tried it using an absolute path for test2.html
- makes no difference.

Thank you!

<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<title></title>

</head>
<body>
<object data="test2.html" standby="Please standby...Loading Text">
Alternate Content
</object>
</body>
</html>
Give up the object tag - nice idea. I'm sure you can use it in a few
years time when more browsers are properly supporting it. Use an
iframe instead. The iframe fails W3C validation when you set the
DOCTYPE to HTML 4.01 strict - but IE6 and Firefox will still display
such a page in standards mode. What more can you ask for than that
browsers display your pages consistently?
Apr 6 '07 #6

P: n/a
Scripsit Harry Haller:
Use an iframe instead.
Yeah, that way you cover IE 3 too!
The iframe fails W3C validation when you set the
DOCTYPE to HTML 4.01 strict
The point being? Of course validation fails when you specify a document type
that does allow an element you're using. Both the object and the iframe fail
validation when you use the HTML 2.0 document type.
- but IE6 and Firefox will still display
such a page in standards mode. What more can you ask for than that
browsers display your pages consistently?
If you are happy with IE6 and Firefox showing the page, why do you think
iframe is better than object?

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 6 '07 #7

P: n/a
On Apr 5, 12:44 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit Dudely:

You're welcome. Now please learn to quote on Usenet: quote the relevant
sentence or two _before_ your own message.

I'll try, but I'm afraid we have a difference of taste/style. If in
fact there is a particular thought/idea/sentence that can be isolated
from the rest of the text without losing context, then yes what you've
stated works for me too. When however the entire post is essentially
necessary to maintain the context, I quote the whole thing and respond
at the top. Why?

When I'm reading through a thread, I don't want to have to page down
each message to get to the new text. I find it somewhat irritating,
and unless I'm truly 200% interested in the thread, I won't bother to
read through it to find the new material. I want to see what's new at
the top, so I don't have to spend time constantly paging down to get
to what may or may not be useful material, hidden amongst the old
text. So to me, it's a courtesy for others to do it that way, and
therefore I try to extend the same courtesy to others.

Perhaps you can't. But you can suggest omission of the scrollbars by setting
body { overflow: hidden; }
in a stylesheet for the _embedded_ document. Before doing so, think about
the consequences: such a setting would procrustinate the content if it
doesn't fit, and can you really know whether it fits?
That's an interesting idea. It will work for static text, and/or
other content that has a fixed display height. Headers, footers, and
simple repetitious paragraphs come to mind. Not to mention certain
"windowed" content areas, that are fixed in height; the "headings" and
rows supplied are always the same, but the actual info. changes.
Example: Weather reports (temp./high/low/wind direction/wind speed,
etc.).

P.S. I'm afraid you're using <objectas a method of including an HTML
document in another.
Yes I am.
Though successful to a fairly limited degree, that's
not the right approach; use server-side includes, preprocessing, or just
redesign the site so that you don't need such inclusion.

Actually, I originally designed it to use SSI. Then along came a
third party application which is designed using PHP, that I wanted to
integrate into my site. It turns out, that I have to rewrite all of
my pages to fit into this PHP application. The application won't
parse SSI, I can't get it to recognize .shtml files.

I have in fact redesigned the site so that I don't need the inclusion
- however I'm horribly disatisfied with the results, as it's big &
ugly - the precise reason why I used SSI in the first place. I've
even tried PHP includes as an SSI replacement. Doesn't work. I
probably have to rename all of my .html files to .php and rewrite them
as well, in order to use PHP includes; but that's an experiment I just
can't afford to spend the time on.

The third party application sold me on itself, by advertising simple
integration into existing sites (plus the fact that there isn't
anything else available that offers the equivalent functionality).
There was no mention of having to redo all of my work. I guess the
3rd party app. never considered anything beyond simple .html files
which could be cut & pasted.

When someone mentioned objects to me, I jumped on it based on the
specification of what it was supposed to be able to do. It appeared
to solve ALL of my problems. Sadly, appearances can be deceiving.
Thanks again for the ideas!

Apr 6 '07 #8

P: n/a
On Apr 6, 1:29 am, Harry Haller <H...@Steppenwolf.comwrote:
Give up the object tag - nice idea. I'm sure you can use it in a few
years time when more browsers are properly supporting it. Use an
iframe instead. The iframe fails W3C validation when you set the
DOCTYPE to HTML 4.01 strict - but IE6 and Firefox will still display
such a page in standards mode. What more can you ask for than that
browsers display your pages consistently?
Actually, ONE of the places I want to use an object uses an iframe. I
want to replace the iframe with an object, because iframes are
supposed to be specific cases of objects, and I wanted to use the
generic object instead. My understanding of it was that objects were
more widely supported than iframes.


Apr 6 '07 #9

P: n/a
On Apr 6, 10:59 am, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit Harry Haller:
The iframe fails W3C validation when you set the
DOCTYPE to HTML 4.01 strict

The point being? Of course validation fails when you specify a document type
that does allow an element you're using. Both the object and the iframe fail
validation when you use the HTML 2.0 document type.

So, just out of curiosity what doctype would you recommend?

I'm actually using XHTML 1.1 strict, but I'm not writing pure xhtml,
nor am I expecting to pass validation (I pass all the major issues,
but there are many minor things that just don't matter which fail). I
have too many "third party" snippets in use, many of which I either
don't know how to change as the inner workings are way over my head,
or would simply prefer not to change since that means yet another
round of experiments & testing, when all I want to do is get my one
website up & running and out of "test mode".

Thank you

Apr 6 '07 #10

P: n/a
Scripsit Dudely:
I'm actually using XHTML 1.1 strict, but I'm not writing pure xhtml,
nor am I expecting to pass validation
That's a refreshingly new idea: combining the bogosity of swearing by the
"latest recommendation" with careless tag soup authoring.

(By the way, there is no XHTML 1.1 strict. The XHTML 1.1 specification does
not make any Strict vs. Transitional distinction. But using a doctype that
mentions "XHTML 1.1 strict" might be one way of putting browsers into quirks
mode, which may well match the way your code has been written.)

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Apr 6 '07 #11

P: n/a
On Apr 6, 2:11 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit Dudely:

(By the way, there is no XHTML 1.1 strict. The XHTML 1.1 specification does
not make any Strict vs. Transitional distinction.
Right as usual. I mis-remembered, combined 2 different things I
partially remembered, and instead of checking to be sure, I typed what
I thought was correct. Woe is me. I'm actually using: <!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/
xhtml11.dtd">
Apr 6 '07 #12

This discussion thread is closed

Replies have been disabled for this discussion.