Using object tags to open HTML, can it be done?

J

jenngra

I know there are other ways to do this, is there for elegance a way to
open a HTML document within <object> tags --- anyway possible under the
sun?

<object width="400" height="400"> .... a HTML document or url....
</object>
 
T

Toby Inkster

jenngra said:
I know there are other ways to do this, is there for elegance a way to
open a HTML document within <object> tags --- anyway possible under the
sun?

<object data="foo.html" type="text/html" width="400" height="400">
<p><a href="foo.html">Appropriately titled link for browsers that
don't support <code>&lt;OBJECT&gt;</code></a>.</p>
</object>

Easy.
 
C

Chris Diver

Toby said:
<object data="foo.html" type="text/html" width="400" height="400">
<p><a href="foo.html">Appropriately titled link for browsers that
don't support <code>&lt;OBJECT&gt;</code></a>.</p>
</object>

Easy.
Hi

On this very topic, in FF and Opera this looks fine, however
I was shocked when I tried to view it in IE and it didn't look
the same. IE decided that it needed a greyed out vertical scrollbar
and a 3D border so it looks like it goes into the
page. Does anyone know a way around it? I tried using 'overflow' and
'border-style' style attributes to no avail.

Thanks,

Chris.
 
N

Neredbojias

To further the education of mankind, Chris Diver
Hi

On this very topic, in FF and Opera this looks fine, however
I was shocked when I tried to view it in IE and it didn't look
the same. IE decided that it needed a greyed out vertical scrollbar
and a 3D border so it looks like it goes into the
page. Does anyone know a way around it? I tried using 'overflow' and
'border-style' style attributes to no avail.

No way around it, though maybe IE7...?
 
S

Spartanicus

Chris Diver said:
On this very topic, in FF and Opera this looks fine, however
I was shocked when I tried to view it in IE and it didn't look
the same.

It's foolish to expect things to look identical between browsers. IE's
default rendering is perfectly acceptable behaviour.
IE decided that it needed a greyed out vertical scrollbar
and a 3D border so it looks like it goes into the
page.

Does anyone know a way around it? I tried using 'overflow' and
'border-style' style attributes to no avail.

Using <object> to embed HTML opens a new viewport inside the main
viewport, this viewport is totally independent from the main viewport.
The embedded viewport cannot be styled by the viewport in which it is
embedded, if you want to style it you should do so by specifying the
styling for the embedded document itself.

Different browsers behave slightly differently, IE needs the styling on
the <html> element, Opera needs it on the <body> element.

A word of warning: the inset border is important for users to recognize
the embedded document as being in an independent viewport. The scrollbar
is absolutely essential.

The usual reason why people want to hide both is because they are
confusing embedding another fully independent HTML document with
including code fragments such as Server Side Inclusion. Embedding is
*not* some form of "client side inclusion", there is no such thing (for
good reasons).

Don't clown around with embedding if what you really need is code
fragment inclusion, use SSI or a server side scripting language to do
that.
 
T

Toby Inkster

Chris said:
On this very topic, in FF and Opera this looks fine, however
I was shocked when I tried to view it in IE and it didn't look
the same.

You are too easily shocked.

IE often does things differently from other browsers. In most cases it's
because the other browsers get things right and IE screws them up. In this
case though, IE isn't screwing things up -- it is perfectly justified in
doing this:
IE decided that it needed a greyed out vertical scrollbar and a 3D
border so it looks like it goes into the page.

That's not to say that the other browsers are wrong either -- just
different. HTML (and to a lesser extent CSS) allows for a huge range of
different ways to present the same thing, with none of them being "wrong".

Now might be the time to state what your real problem is, which I suspect
might be along the lines of "I need to include some external data into a
page seamlessly"; in which case the solution is a server-side include, or
some server-side scripting in, for instance, PHP.
 
C

Chris Diver

Toby said:
You are too easily shocked.

IE often does things differently from other browsers. In most cases it's
because the other browsers get things right and IE screws them up. In this
case though, IE isn't screwing things up -- it is perfectly justified in
doing this:


That's not to say that the other browsers are wrong either -- just
different. HTML (and to a lesser extent CSS) allows for a huge range of
different ways to present the same thing, with none of them being "wrong".

Now might be the time to state what your real problem is, which I suspect
might be along the lines of "I need to include some external data into a
page seamlessly"; in which case the solution is a server-side include, or
some server-side scripting in, for instance, PHP.

Thank you to everyone for the replies.

It doesn't work in IE7 (beta anyway not that it matters as people will
be using IE6 for the moment I think).

I wasn't really shocked, I was being sarcastic, but its hard to get
that across in plain text, if not impossible.
That's not to say that the other browsers are wrong either -- just
different.

Isn't that why we have standards, but there's a whole new argument
thats been argued to the death.

I basically need to put an external forum, which I can not edit, with my
header and footer (without using frames if possible). I don't know if
this is possible in server side scripting, I haven't done much of it. If
anyone could point me in the direction of a little tutorial that
achieves this, or what I need to look for, it would be appreciated.

Cheers,
Chris
 
S

Spartanicus

Chris Diver said:
I basically need to put an external forum, which I can not edit, with my
header and footer (without using frames if possible). I don't know if
this is possible in server side scripting, I haven't done much of it. If
anyone could point me in the direction of a little tutorial that
achieves this, or what I need to look for, it would be appreciated.

http://homepage.ntlworld.ie/spartanicus/chris.htm
 
S

Spartanicus

Chris Diver said:
Thats pretty much what I've got but ideally would like it to look the
same way in IE as Firefox. :)

Get rid of the obsession that things should look the same way. As I've
said before the scrollbar is essential, and the inset border is helpful.

The only way to style external content is to use server side scripting
to draw in the code and then restructure it. This is likely to be
illegal due to copyright restrictions.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top