IE _top linking buggy? workaround available?

T

Thomas Maier-Komor

Hi everybody,

I have a problem with a certain link pattern that gets resolved wrong in
the IE, but works find on Firefox. Maybe somebody has an idea, how to
work around it.

I have an .html file that has a CSS and two div sections, the body
itself is empty. One div section has an embedded object of type
"text/html" that is a table of contents. This embedded object includes
links with target _top that are opened in Firefox in _top, but are
opened in IE in the div section that contains the object holding the
table of contents .html file. Understand what I mean?

Simplified code sample:
index.html:
<html>
<head>
<title>my title</title>
<link rel="stylesheet" type="text/css" href="default.css"/>
</head>
<body>
<div id="toc">
<object data="toc.html" type="text/html" height="100%"
width="220px"></object>
</div>

<div id="body">
some text
</div>
</body>
</html>

toc.html:
<html>
<head>
<title>table of contents</title>
<link rel="stylesheet" type="text/css" href="toc.css"/>
</head>
<body>
<h3> header </h3>
<ul>
<li><a href="1.html" target="_top">entry1</a></li>
<li><a href="2.html" target="_top">entry2</a></li>
</ul>
</body>
</html>

This works perfectly in Firefox and has the advantage that I only need
to maintain a single file for the TOC, without server-side includes,
javascript, php, or anything else. But it does not work in Internet
Explorer...

I would be grateful for any hint or idea how to get it working.

TIA,
Tom
 
J

Jonathan N. Little

Thomas said:
Hi everybody,

I have a problem with a certain link pattern that gets resolved wrong in
the IE, but works find on Firefox. Maybe somebody has an idea, how to
work around it.

I have an .html file that has a CSS and two div sections, the body
itself is empty. One div section has an embedded object of type
"text/html" that is a table of contents. This embedded object includes
links with target _top that are opened in Firefox in _top, but are
opened in IE in the div section that contains the object holding the
table of contents .html file. Understand what I mean?
<snip code>


http://www.boutell.com/newfaq/creating/include.html
WWW FAQs: How do I include one HTML file in another?
 
T

Thomas Maier-Komor

Jonathan said:
<snip code>


http://www.boutell.com/newfaq/creating/include.html
WWW FAQs: How do I include one HTML file in another?

that's a nice link, but it only offers the solutions I cannot use and
explicitly excluded as an option in my original posting.

Any other idea concerning my problem? If not I am probably going to
cancel IE support, as it looks like a bug to me, how IE handles this
situation...
 
J

Jonathan N. Little

Thomas said:
that's a nice link, but it only offers the solutions I cannot use and
explicitly excluded as an option in my original posting.

Any other idea concerning my problem? If not I am probably going to
cancel IE support, as it looks like a bug to me, how IE handles this
situation...

My point was that is not how you should do file includes, Do you have a URL?
 
C

Chris Sharman

Thomas said:
Any other idea concerning my problem? If not I am probably going to
cancel IE support, as it looks like a bug to me, how IE handles this
situation...

Dumping 80-90% of potential visitors seems a fairly drastic own goal,
even for a personal site.

How about using ie include comments to make your site framed (for ie only).

I don't much like frames, or ie, but ie comments are a neat & compliant
solution.

Chris
 
T

Thomas Maier-Komor

Chris said:
Dumping 80-90% of potential visitors seems a fairly drastic own goal,
even for a personal site.

my visitors are >90% UNIX users that are interested in mbuffer. So IE
support is more or less just for completeness. But I am already having a
hard time getting the CSS right for IE. Selfhtml misses the details how
one calculates the margins and paddings for IE, it only has very short
examples without any further description.
How about using ie include comments to make your site framed (for ie only).

I thought about this, but IFrames look awfully (I couldn't get rid of
the black frame). And normal frames can only be placed in rows and
columns. But doing it for IE like this might be an alternative, although
it sounds like doing all work double to me.
I don't much like frames, or ie, but ie comments are a neat & compliant
solution.

Could you point me to an example (not selfhtml) that goes a little bit
into the details of IE comments?

Thanks,
Tom
 
J

Jonathan N. Little

Neredbojias said:
With neither quill nor qualm, Thomas Maier-Komor quothed:


You have no closing object tag - </object>.

Yep, validation can help here:

http://validator.w3.org/check?uri=h...etect+automatically)&doctype=Inline&verbose=1
Result for http://www.maier-komor.de/ - W3C Markup Validator


You're on an Apache webserver, you must have PHP. This object include is
just so the 'wrong way' to do this....

index.php:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Welcome to maier-komor.de</title>
<link rel="stylesheet" type="text/css" href="default.css">
</head>
<body>
<div id="toc">
<?php include_once('toc.html');?>
</div>

<div id="body">

<h1>Welcome to maier-komor.de</h1>
This is the web site of Thomas Maier-Komor.
<br>
<hr><address><a href="mailto:[email protected]">Thomas
Maier-Komor</a></address>
</div>
</body>
</html>
 
T

Thomas Maier-Komor

Jonathan said:
Yep, validation can help here:

http://validator.w3.org/check?uri=h...etect+automatically)&doctype=Inline&verbose=1

Result for http://www.maier-komor.de/ - W3C Markup Validator


You're on an Apache webserver, you must have PHP. This object include is
just so the 'wrong way' to do this....

index.php:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Welcome to maier-komor.de</title>
<link rel="stylesheet" type="text/css" href="default.css">
</head>
<body>
<div id="toc">
<?php include_once('toc.html');?>
</div>

<div id="body">

<h1>Welcome to maier-komor.de</h1>
This is the web site of Thomas Maier-Komor.
<br>
<hr><address><a href="mailto:[email protected]">Thomas
Maier-Komor</a></address>
</div>
</body>
</html>

I tested PHP before, but I am not allowed to use it. Your sample
(test.html and test.php) on my server just does not include the
requested file.

My provider disables PHP and SIS explicitly for me, because I don't pay
enough ;-) So I will probably have to invest the additional ~60EUR/year
to get PHP or SIS or switch to another provider.

Does anybody know a decent German provider that overs either SIS or PHP
at < 30EUR/year?

Thanks anyway for all comments.

Cheers,
Tom
 
T

Thomas Maier-Komor

Chris said:
Dumping 80-90% of potential visitors seems a fairly drastic own goal,
even for a personal site.

my visitors are >90% UNIX users that are interested in mbuffer. So IE
support is more or less just for completeness. But I am already having a
hard time getting the CSS right for IE. Selfhtml misses the details how
one calculates the margins and paddings for IE, it only has very short
examples without any further description.
How about using ie include comments to make your site framed (for ie only).

I thought about this, but IFrames look awfully (I couldn't get rid of
the black frame). And normal frames can only be placed in rows and
columns. But doing it for IE like this might be an alternative, although
it sounds like doing all work double to me.
I don't much like frames, or ie, but ie comments are a neat & compliant
solution.

Could you point me to an example (not selfhtml) that goes a little bit
into the details of IE comments?

Thanks,
Tom
 
A

Axel

Thomas said:
I tested PHP before, but I am not allowed to use it. Your sample
(test.html and test.php) on my server just does not include the
requested file.

My provider disables PHP and SIS explicitly for me, because I don't pay
enough ;-) So I will probably have to invest the additional ~60EUR/year
to get PHP or SIS or switch to another provider.

Does anybody know a decent German provider that overs either SIS or PHP
at < 30EUR/year?

http://shells24.com/de/hostingdetails.htm

Axel
 
J

Jonathan N. Little

Thomas Maier-Komor wrote:
I tested PHP before, but I am not allowed to use it. Your sample
(test.html and test.php) on my server just does not include the
requested file.

My provider disables PHP and SIS explicitly for me, because I don't pay
enough ;-) So I will probably have to invest the additional ~60EUR/year
to get PHP or SIS or switch to another provider.

Does anybody know a decent German provider that overs either SIS or PHP
at < 30EUR/year?

30EUR | 37USD/yr is pretty cheap but:

http://www.google.com/search?hl=en&lr=&q=cheap+web+hosting+$35+year+php&btnG=Search
cheap web hosting $35 year php - Google Search

Who says it has to be a German Provider?

http://www.name2host.com/price.htm
Cheap web hosting & free domain: $2.99/mo for 100Mb, CGI/PHP/MySql ...

For a few EURs more ...

I don't use a local hosting company, but one across the country. Less
than 1/2 the price and many times the disk space and transfer rate...

NOTE 1: I know nothing about hosting company above, just an example that
1: they are out there and 2: easy to find.

NOTE 2: What you are doing now is what is call a 'real kludge' and will
always be problematic.
 
C

Chris Sharman

Thomas said:
my visitors are >90% UNIX users that are interested in mbuffer. So IE
support is more or less just for completeness. But I am already having a
hard time getting the CSS right for IE. Selfhtml misses the details how
one calculates the margins and paddings for IE, it only has very short
examples without any further description.


I thought about this, but IFrames look awfully (I couldn't get rid of
the black frame). And normal frames can only be placed in rows and
columns. But doing it for IE like this might be an alternative, although
it sounds like doing all work double to me.


Could you point me to an example (not selfhtml) that goes a little bit
into the details of IE comments?

http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
Google for internet explorer conditional comments.

Basically
<!--[if IE]>Do yourself a favour - get <em>Firefox</em>.<![endif]-->

Note that this is a syntactically valid html comment, ignored by all
well-behaved browsers, but actioned by ie. You can also specify
different behaviour in different versions, in the unlikely event that
something gets fixed.

Unfortunately the syntax for including something in other browsers & not
ie is not valid (unsurprisingly).
<[if !IE]>Happy Days<![endif]>

Chris
 
A

Alan J. Flavell

http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
Google for internet explorer conditional comments.

Basically
<!--[if IE]>Do yourself a favour - get <em>Firefox</em>.<![endif]-->

Note that this is a syntactically valid html comment, ignored by all
well-behaved browsers, but actioned by ie.
Indeed.

Unfortunately the syntax for including something in other browsers &
not ie is not valid (unsurprisingly).
<[if !IE]>Happy Days<![endif]>

After I had devised a way of doing that with valid syntax, I found
that someone else had already done so, and had come up with a similar,
but slightly different, answer.

I haven't extensively tested either one (viz. I only tried IE6), but
this is its temporary working home, anyway :
http://ppewww.ph.gla.ac.uk/~flavell/tests/obj.html

Here's my recipe:

<!--[if !IE]>
-->

....content for www-compatible browsers...

<!--
<![endif]-->

The newlines are unlikely to be significant, I think - this
ought to function equally well

<!--[if !IE]> -->

[...content for www-compatible browsers...]

<!-- <![endif]-->

or maybe even the whitespace is redundant, I don't know.

Whereas, the technique from "Object Paranoia" goes like this, quoting
from their web page:

---
/

<!--[if !IE]> <-->
<p>
Content for everyone except Internet Explorer
</p>
<!--> <![endif]-->

\___


I really have no idea whether their extra pointy brackets are doing
anything beneficial.

Hope this is useful - let me/us know if there's something goes wrong
with one or the other in some situation that I hadn't tested.
thanks.
 
T

Thomas Maier-Komor

Chris said:
Thomas said:
my visitors are >90% UNIX users that are interested in mbuffer. So IE
support is more or less just for completeness. But I am already having a
hard time getting the CSS right for IE. Selfhtml misses the details how
one calculates the margins and paddings for IE, it only has very short
examples without any further description.


I thought about this, but IFrames look awfully (I couldn't get rid of
the black frame). And normal frames can only be placed in rows and
columns. But doing it for IE like this might be an alternative, although
it sounds like doing all work double to me.


Could you point me to an example (not selfhtml) that goes a little bit
into the details of IE comments?

http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
Google for internet explorer conditional comments.

Basically
<!--[if IE]>Do yourself a favour - get <em>Firefox</em>.<![endif]-->

Note that this is a syntactically valid html comment, ignored by all
well-behaved browsers, but actioned by ie. You can also specify
different behaviour in different versions, in the unlikely event that
something gets fixed.

Unfortunately the syntax for including something in other browsers & not
ie is not valid (unsurprisingly).
<[if !IE]>Happy Days<![endif]>

Chris

Thanks, I will try to do it with Iframes for IE.

Cheers,
Tom
 
T

Thomas Maier-Komor

Chris said:
Thomas said:
my visitors are >90% UNIX users that are interested in mbuffer. So IE
support is more or less just for completeness. But I am already having a
hard time getting the CSS right for IE. Selfhtml misses the details how
one calculates the margins and paddings for IE, it only has very short
examples without any further description.


I thought about this, but IFrames look awfully (I couldn't get rid of
the black frame). And normal frames can only be placed in rows and
columns. But doing it for IE like this might be an alternative, although
it sounds like doing all work double to me.


Could you point me to an example (not selfhtml) that goes a little bit
into the details of IE comments?

http://msdn.microsoft.com/workshop/author/dhtml/overview/ccomment_ovw.asp
Google for internet explorer conditional comments.

Basically
<!--[if IE]>Do yourself a favour - get <em>Firefox</em>.<![endif]-->

Note that this is a syntactically valid html comment, ignored by all
well-behaved browsers, but actioned by ie. You can also specify
different behaviour in different versions, in the unlikely event that
something gets fixed.

Unfortunately the syntax for including something in other browsers & not
ie is not valid (unsurprisingly).
<[if !IE]>Happy Days<![endif]>

Chris

Thanks, I will try to do it with Iframes for IE.

Cheers,
Tom
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top