Re: HOAW
| From: | Melvyn Sopacua | Date: | Fri, 30 Aug 2002 11:12:34 +0000 |
| Subject: | Re: HOAW | ||
| References: | 1 | Groups: | php.doc.chm |
| Request: | Send a blank email to php-doc-chm+get-449@lists.php.net to get a copy of this message | ||
At 11:27 8/30/2002 +0200, Gabor Hojtsy wrote:
The work-around is as follows: <div id="checkStore"> <script> var isOk = new Boolean(false); var chm_path = unescape(location.href.substring(8, location.href.lastIndexOf("/")+1)); var testpage = 'notthere'; // change to simplepage var strIframe = '<iframe src="mk:@MSITStore:' + chm_path +Leftover from previous tries :-0'simplepage.chm::/' + testpage + '.html" id="checkbuff" ' + '></iframe>';function checkState() {if(event.srcElement.readyState == 'interactive') { isOk=true; }} document.write('<xml src="mk:@MSITStore:' + chm_path + 'simplepage.chm::/' + testpage + '.html" id="checkbuff" ' + 'style="display:none;" onreadystatechange="checkState()" ></xml>' );function processResult() {if(isOk == true) {document.getElementById('boxUserNotes').innerHTML=strIframe;}} window.onload=processResult; </script> </div> <div id="boxUserNotes"></div> Question: why the loader is in a div id="checkStore"??
Problems:
- the boxUserNotes content should not be strIframe, but the contents
of the xml data island, isn't it? why there is a need to load in the
file two times (it's slow)
There is no need. Basically - I've been fiddling with:
-- img src / onerror (always fails, since content != image/*)
-- object data= onerror (always succeeds)
-- iframe readystates (causing a crash when you change the src in between events :-)
-- and finally the xml data island, which is the only element I found, which can verify the existence of an external source and act on that.
Since I don't have the decompiled source for the official distribution, I didn't know, whether you wanted to use the XML element, and pull the comments outof a data-island. This would mean, comments need to be structured and edited. So I left the iframe alone.
- xml data islands are only supported from IE5 and some guys really
would like to see this working with IE4, which is was not aware
for some time, but Brendan is back to work on it again
Hmm - since turning on friendly HTTP error messages is an option, there are some things that just can't be done in legacy software and shouldn't this be considered an acceptable work-around?
I'm surprised HTML Help still works with IE4.
Really the only other option would be to merge them into 1 file. I have tried __many__ things.
If HTML Help allows real frames (not iframes) then there would be a chance, because that is a real window object, which can handle 'onerror' - this would mess up layout I guess.
- aren't there any problems when the XML data island contains non-XMLYes. Your best bet would be to put in a root element and a CDATA section. On the other hand - I don't know how you build it, but by using libxml's HTML parser, one can create an XML document relatively easy (your biggest problem will probably be mixed charsets). Met vriendelijke groeten / With kind regards, Webmaster IDG.nl Melvyn Sopacua <@Logan> I spent a minute looking at my own code by accident. <@Logan> I was thinking "What the hell is this guy doing?"data (HTML in this case)?