re: HOW and what we know about the iframe problem
| From: | Gabor Hojtsy | Date: | Fri, 30 Aug 2002 12:30:44 +0000 |
| Subject: | re: HOW and what we know about the iframe problem | ||
| References: | 1 | Groups: | php.doc.chm |
| Request: | Send a blank email to php-doc-chm+get-451@lists.php.net to get a copy of this message | ||
> *****************************************
> function loadNotes()
> {
> // Notes buffer for user notes to display on this page
>
> document.write(
> '<iframe name="nbuff" id=nbuff style="display:none"
> src="about:blank"></iframe>'
> );
> nbuff.location = 'c:/php_manual_notes/' + chmfile_page;
> file://'<a href="c:/php_manual_notes/' + chmfile_page + '"
target="nbuff">Expand
> User Notes!</a>'
>
> }
> *****************************************
The problem with this is that you specify a non-existent page outside
any CHM, which of course works. See test2.html in the iframetests.zip file.
Thus far, we know that:
- if a document is loaded from a CHM file
- into an iframe
- and it's nonexistent
- and the user's browser is IE6 (or IE 5.5 as one reported)
- and "Show friendly HTTP error messages" is set to off
the error message shows up in the main document window, instead
of the iframe. If the iframe src is not in a CHM or the browser
is not IE6 (or IE 5.5) or the friendly msgs are on there is no
problem.
Test1.html and test2.html does not in line with the first requirement
(they load a document from outside a CHM). Test3 and test4 are in line
with this, and test4 is the one showing the error message.
Test5 is a try to use the ms-its protocol in hope that it won't be
bogus, but it is...
Test6 is a try to modify the src, but that even unable to work in IE5 ;)
Test7 and test8 are tries to modify the location. These are new so the
behaviour of them are not confirmed. Test7 does not work on my machine
for some reason, though it should...
Test9 and test10 are tries to ommit the CHM protocol, but that of course
means that the file cannot be loaded and thus they does not work.
So the actual method we use is used in test4 (except that the file name
is of course dinamically computed from the actually showed HTML file
name, but that of course should not change anything as the whole thing is
written out using JS).
As far as I can see know, this is all I can say about our problem. On
machines meeting the points above pages without user notes are not
displayed.
Some possible solution proposals, and why they are not OK:
- Merge the two CHM files into one <=> Anyone can read the search chapter
in the HTML Help section of the current CHM to see how many benefits we
have with this split. In addition we would not like to host the size of
the user notes for every language in the future, when this manual will
be available in all the languages, and would not like to spare that
bandwidth.
- Put a 0bytes page for every page without notes into the notes CHM <=>
We cannot guarantee that we can put a pair for every page because users
will be able to upgrade the CHMs separately, and there are many
langauges
with the possibility to add their own pages...
- Put notes into a real frame <=> Every time a page is loaded from the
index
tab, search tab, favorites tab, contents tab or from outside the CHM [an
IDE], we would need to force the page into one frame, and it would take
time as well as more JS magic, so I would not like to go on that way.
- Turn on that friendly registry setting when CHM starts up and turn back
to
it's original value after closed <=> It's impossible to write into the
registry in DHTML luckily ;)
So we tried and/or discussed several possibilities, but were unable to
find any solution for the problem (which is of course not a bug in our
code, but simply a bug in Internet Explorer). Doh.
Goba