Discussion:
HTML Help detection
(too old to reply)
Thomas Steinbach
2009-07-02 18:49:48 UTC
Permalink
Hello,

is it possible to detect in a webpage if it is diplayed
in a HTML Help File (chm)?

And what is the engine and identification of "the"
HTML Help "Browser"? IE7 ?


Thomas
Pete Lees
2009-07-02 20:19:01 UTC
Permalink
Hi, Thomas,
Post by Thomas Steinbach
is it possible to detect in a webpage if it is diplayed
in a HTML Help File (chm)?
Yes, you can use a script like the one below to determine whether the
current page is compiled into a .chm file or not.

<script type="text/javascript">
<!--

// Search for a double colon in the URL of the current file.
// If none is found then the file isn't compiled into a CHM.
var a = location.href.search("::");

if (a <= 0) {
// Current file is NOT compiled into a CHM.
alert("Not in a CHM");
}

else {
// Current file IS compiled into a CHM.
alert("Compiled into a CHM");
}

//-->
</script>
Post by Thomas Steinbach
And what is the engine and identification of "the"
HTML Help "Browser"? IE7 ?
Yes, HTML Help uses Internet Explorer, but any version of IE from 3.02
onwards will do (the more modern, the better). See:

http://frogleg.mvps.org/helptechnologies/htmlhelp/hhsysreq.html

Pete

Continue reading on narkive:
Loading...