David Webber
2009-02-06 13:30:23 UTC
I am trying to link to topics in and outside of CHM files in javascript with
location.href = Url;
I want to compute Url from the current location, thisUrl, obtained from
var thisUrl = location.href;
Can anyone help me clarify the syntax of thiUrl for various situations on
the local machine.
If I load a local HTML file into IE7 then I get thisUrl as
file:///C:/.../.../filename.htm
or schematically file:///<path-with-forward-slashes>
If I am looking at a .chm file in the help engine, then I get thisURL as
mk:@MSITStore:C:\...\...\chmfile.chm::/.../...filename.htm
or schematically
mk:@MSITStore:<chm-path-with-back-slashes>::<internal-path-with-forward-slashes>
and I understand I might get
ms-its:<chm-path-with-back-slashes>::<internal-path-with-forward-slashes>
I'm somewhat puzzled:
1. Why are there these two separate conventions for paths to topics in chm
files?
2. When I look at location.href can I rely on the consistent use of forward
and back slashes in the above way?
[I'm trying to manipulate these strings based on getting any of the three
possibilities.]
Dave
location.href = Url;
I want to compute Url from the current location, thisUrl, obtained from
var thisUrl = location.href;
Can anyone help me clarify the syntax of thiUrl for various situations on
the local machine.
If I load a local HTML file into IE7 then I get thisUrl as
file:///C:/.../.../filename.htm
or schematically file:///<path-with-forward-slashes>
If I am looking at a .chm file in the help engine, then I get thisURL as
mk:@MSITStore:C:\...\...\chmfile.chm::/.../...filename.htm
or schematically
mk:@MSITStore:<chm-path-with-back-slashes>::<internal-path-with-forward-slashes>
and I understand I might get
ms-its:<chm-path-with-back-slashes>::<internal-path-with-forward-slashes>
I'm somewhat puzzled:
1. Why are there these two separate conventions for paths to topics in chm
files?
2. When I look at location.href can I rely on the consistent use of forward
and back slashes in the above way?
[I'm trying to manipulate these strings based on getting any of the three
possibilities.]
Dave
--
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm
David Webber
Author of 'Mozart the Music Processor'
http://www.mozart.co.uk
For discussion/support see
http://www.mozart.co.uk/mozartists/mailinglist.htm