I've never found a good JS debugger. I've always just stuck with insterting
alert("Hello") popups. :-)
Post by David WebberPost by Pete LeesPost by David WebberAm I right in thinking that, when I call HtmlHelp() to load a .chm file, the
HTML is rendered by the default browser on the computer?
No, it's only ever Internet Explorer, even if that isn't the default browser
on the computer. The topic pane of the HTML Help viewer is actually an
embedded IE window (it hosts the IE WebBrowser control, Shdocvw.dll).
That is what I *would* have thought except that...
Many years ago I bought the RoboHelp software for writing the old Winhelp
help files for Windows 3.1. I upgraded it several times, (costing an arm
and a leg each time) as it relied on a specific version of Word for
editing the files, and each new computer I got had a different version of
Word. I ended up with Robohelp 9.1 I think. Somewhere along the line I
used its converter module to produce me an HtmlHelp project and all the
.htm files for what was, by then, quite a large help system. (The html
syntax was poor by modern standards, but it compiled.) Its Htmlhelp
module did not rely on Word and that extended the life of the product for
me a lot. But I found it doesn't run on Vista.
It seems that something called RoboHelp is now produced by another
company, and either it's completely different or they started renumbering
versions form 1. I didn't find an upgrade path when I found it didn't
run on Vista. So these days I use FAR which is much friendlier on the
pocket. It is closer to what goes on under the bonnet, and is forcing me
to learn a bit more about HTML help - but that's no bad thing.
However I really treasure one thing from the Robohelp days: a javascript
module eHelpDhtm.js. It is enormous and I probably don't need most of
it, but one thing it does do *brillliantly*: pop-up windows with no frame
or buttons, which can display any HTML topic complete with text and
graphics (and has a shadow): just like the old Winhelp used to have. The
pop-up disappears when you click on the main window.
Recently I have been trying to figure out how it works (in order to get
rid of the parts I don't need) and am not even coming close. It is almost
entirely devoid of comments and it prints out at about 60 pages long!
It is absolutely jam packed with 'if"s, switching on which browser it
finds, and which version.
That's another thing I want rid of - these days I don't really have to
test for versions of IE earlier than 4 or Netscape earlier than 4. [I
assume that modern versions of "Mozilla" will have Navigator objects which
register the same as Netscape.] So I'm wondering why it is testing for
non-IE browsers. I guess the answer is that it was also designed to go
on web sites, (though as far as I knew it came specifically for
compilation in .chm files).
Anyway the two functions I use
(a) respond to onmousover= on a link and note the mouse position (in a
browser dependent way which allows for the scroll position)
(b) go with the href="javascript::...." and launch the pop-up (at the
above determined location)
but the latter calls a vast chain of functions - all with browser switches
all over the place. At least I know now that I can always follow the
IE>=4 path!
But so far I can't even see how it opens a window with no frame, or where
it does it, let alone how it determines how big to make it! It may be a
job for a long winter evening (or seventeen), with my trusty javascript
manual to hand. Half of me says it ain't broke so I shouldn't try and
fix it. The other half wants to know *exactly* what is going on.
(I wonder - is there a way to step through javascript in .chm files with a
debugger????)
Anyway, long story, but that was why I asked.
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