473,396 Members | 2,002 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Need help using OBJECT tag

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
11 4048
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
0
by: David Dolheguy | last post by:
I am in desperate need to get help in answering some questions in regards to building a DCOM Server using C#. I need to create a DCOM server using C#.NET, I realise that you first need to create...
5
by: MFC | last post by:
Ok, after three C# books, (C# How to Program, Programming in the Key of C#, and C# Weekend Crash Course) and three weeks, I believe I have tried everything to make a certain form function...
3
by: Sky Sigal | last post by:
I coming unglued... really need some help. 3 days chasing my tail all over MSDN's documentation ...and I'm getting nowhere. I have a problem with TypeConverters and storage of expandableobjects...
5
by: newjazzharmony | last post by:
I want to share one instance of an object across an ASP dot net application, and I'm trying to weigh the pros and cons of the following two approaches: a) Storing the object in ApplicationState...
18
by: bsruth | last post by:
I tried for an hour to find some reference to concrete information on why this particular inheritance implementation is a bad idea, but couldn't. So I'm sorry if this has been answered before....
13
by: PinkBishop | last post by:
I am using VS 2005 with a formview control trying to insert a record to my access db. The data is submitted to the main table no problem, but I need to carry the catID to the bridge table...
10
by: CuTe_Engineer | last post by:
hii, i have cs assignment i tried to solve it but i still have many errors , plzz help mee :"< it`s not cheating becuz i`ve tried & wrote the prog. i just wanna you to show me my mistakes ...
6
by: Cralis | last post by:
Hi guys, Someone once said, 'You can do that with reflection'. I can't recall what it was I was trying to do at the time, but then he said, 'Any developer knows what reflection is...'. I kept...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.