Linking a hotspot to a popup topic in another .hlp file
Moderators: Alexander Halser, Tim Green
Linking a hotspot to a popup topic in another .hlp file
I need to link a hotspot in an .ipp file to a popup topic in another .hlp file. Is this possible?
My knowledge of javascript is close to zero so I need an exact instructions.
Putting the popup topic into invisible ones and compiling the project as chm and hlp files doesn't work for my case, as I need to link hotspots to an already existing .hlp file.
Thank you in advance.
My knowledge of javascript is close to zero so I need an exact instructions.
Putting the popup topic into invisible ones and compiling the project as chm and hlp files doesn't work for my case, as I need to link hotspots to an already existing .hlp file.
Thank you in advance.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Vladimir,
How you do this depends on what your calling and target files are. If both are .HLP files it's relatively easy, then you can use one of the standard WinHelp linking macros, most of which support jumps to external files. For example, JumpId() has the following syntax:
JumpId([filename>window-name,] topic-ID)
Where filename is the name of the external help file, window-name (optional) is the name of the window type of the topic you want to call and topic-ID is the ID of the topic you are calling. For example:
JumpId(widgets.hlp>infowin, widgets_demo)
or:
JumpId(widgets.hlp, widgets_demo)
You can find the names and syntax of the other linking macros in the Microsoft Help Workshop help file -- just look for linking macros in the index.
However, this only works if both the calling and the target files are WinHelp .HLP files. If you want to call a .HLP file from a HTML Help .CHM file hotspot you're going to need JavaScript -- if that's the case we need to get Alex onto it...
How you do this depends on what your calling and target files are. If both are .HLP files it's relatively easy, then you can use one of the standard WinHelp linking macros, most of which support jumps to external files. For example, JumpId() has the following syntax:
JumpId([filename>window-name,] topic-ID)
Where filename is the name of the external help file, window-name (optional) is the name of the window type of the topic you want to call and topic-ID is the ID of the topic you are calling. For example:
JumpId(widgets.hlp>infowin, widgets_demo)
or:
JumpId(widgets.hlp, widgets_demo)
You can find the names and syntax of the other linking macros in the Microsoft Help Workshop help file -- just look for linking macros in the index.
However, this only works if both the calling and the target files are WinHelp .HLP files. If you want to call a .HLP file from a HTML Help .CHM file hotspot you're going to need JavaScript -- if that's the case we need to get Alex onto it...
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Here is some code. Plain Javascript doesn't work but it works in combination with a HTML ActiveX control. Insert a HTML Code object in your topic with the following code. If you use more than one of these links per page, you must enumerate the object ID (id=hhctrl_ExtLink_1, could be any name but must be unique within the topic).
Same code, but for a popup window:
Same code, but for a seondary window:
Code: Select all
<a href=JavaScript:hhctrl_Extlink_1.hhclick()>Link to HLP topic</a>
<object id=hhctrl_ExtLink_1
type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Winhelp">
<param name="Item1" value="./winhelpfile.hlp">
<param name="Item2" value="topicID">
</object>
Code: Select all
<a href=JavaScript:hhctrl_Extlink_1.hhclick()>Link to HLP topic</a>
<object id=hhctrl_ExtLink_1
type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Winhelp,Popup">
<param name="Item1" value="./winhelpfile.hlp">
<param name="Item2" value="topicID">
</object>
Code: Select all
<a href=JavaScript:hhctrl_Extlink_1.hhclick()>Link to HLP topic</a>
<object id=hhctrl_ExtLink_1
type="application/x-oleobject"
classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="Winhelp">
<param name="Item1" value="./winhelpfile.hlp>Windowname">
<param name="Item2" value="topicID">
</object>
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Here we go...
I unfortunately doesn't work with Impict alone but in combination with a HTML Code Object in Help & Manual, placed before the image. So here's the procedure.
(1) Insert the HTML Code object
(2) Hot spot in the image
I unfortunately doesn't work with Impict alone but in combination with a HTML Code Object in Help & Manual, placed before the image. So here's the procedure.
(1) Insert the HTML Code object
- Insert a HTML code object in your topic, right before the image. The code should could be:
Code: Select all
<object id=hhctrl_ExtLink_1 type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11"> <param name="Command" value="Winhelp"> <param name="Item1" value="./winhelpfile.hlp"> <param name="Item2" value="topicID"> </object>
This is actually the same as in my previous post, but without the HREF part (this part goes into the image hotspot). If you have got more than one external links in the image, create duplicate the code above and enumerate the ActiveX objects.
(2) Hot spot in the image
- Insert a hot spot in your image, switch it to "Macro" and in the entry box for "Alternative HTML Help data" enter the following code:
This will become the HREF part in image map. It references an object that must be declared somewhere else (step 1).
Code: Select all
JavaScript:hhctrl_Extlink_1.hhclick()
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Hi Vladimir,Vladimir wrote:An advice though: include this topic in the H&M help system. It is really worth that.
I've put both sets of instructions together into a tutorial in the Tutorials and Guides section -- this at least makes it a little more accessible.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
I read them and have one comment:
I need such linking not because I have an old .hlp file which I do not want to decompile. What I actually need is to create a multi-window .chm help with popups containing formatted text and graphics.
There are always some graphics that are not worthy to include into the main help text, but some users may want to look at them. Most those are screenshots with windows messages. I put such graphics into a separate .hlp file and make text links in the main chm file to them. Now I am able to link hotspots in the main chm file to popup graphics in an external hlp file.
I could not use the technique described in H&M tutorials - to put popups in the invisible topics and compile a two separate files (chm and hlp) because my invisible topics already contain topics that should be included into the chm file.
I need such linking not because I have an old .hlp file which I do not want to decompile. What I actually need is to create a multi-window .chm help with popups containing formatted text and graphics.
There are always some graphics that are not worthy to include into the main help text, but some users may want to look at them. Most those are screenshots with windows messages. I put such graphics into a separate .hlp file and make text links in the main chm file to them. Now I am able to link hotspots in the main chm file to popup graphics in an external hlp file.
I could not use the technique described in H&M tutorials - to put popups in the invisible topics and compile a two separate files (chm and hlp) because my invisible topics already contain topics that should be included into the chm file.
- Tim Green
- Site Admin
- Posts: 23189
- Joined: Mon Jun 24, 2002 9:11 am
- Location: Bruehl, Germany
- Contact:
Hmm...wouldn't it be easier to use external windows?
You just need to define a new window type in Project > Project Properties > Help Windows and activate "Allow secondary help windows" in the HTML Help options tab. It's quite easy to set the window up without any navigation or header etc., and then you don't need to distribute external files.
The files in the Invisibles section don't have to be popups, they can have any window type, and only the popups will be included in the external .hlp file for the formatted popups.
You just need to define a new window type in Project > Project Properties > Help Windows and activate "Allow secondary help windows" in the HTML Help options tab. It's quite easy to set the window up without any navigation or header etc., and then you don't need to distribute external files.
The files in the Invisibles section don't have to be popups, they can have any window type, and only the popups will be included in the external .hlp file for the formatted popups.
Regards,
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
Tim (EC Software Documentation & User Support)
Private support:
Please do not email or PM me with private support requests -- post to the forum directly.
I use secondary windows in my project, but for other purposes. The problem with them is that the user has to do some actions to close them. In fact a popup window requires an action to close, too, but this is just a mouse click outside the popup window.
I use topics in the invisible topics to put all GUI graphics into them and for text popups linked to those graphics. Those popups are in the main .chm file.
You see, if a user starts help when the program is running, the user already has the GUI on the screen. So, pictures in the help would be just a waste of desktop space.
But some users read the help like manuals without starting the program and they would like to see GUI graphics. They can do this by starting the secondary windows and navigating through the graphics as in a running program by clicking the controls. Some controls are linked to text popups, some to other GUI graphics in the same window, some to graphics in popups in another .hlp files.
I use topics in the invisible topics to put all GUI graphics into them and for text popups linked to those graphics. Those popups are in the main .chm file.
You see, if a user starts help when the program is running, the user already has the GUI on the screen. So, pictures in the help would be just a waste of desktop space.
But some users read the help like manuals without starting the program and they would like to see GUI graphics. They can do this by starting the secondary windows and navigating through the graphics as in a running program by clicking the controls. Some controls are linked to text popups, some to other GUI graphics in the same window, some to graphics in popups in another .hlp files.
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Pardon me, Vladimir. This is supported in H&M directly. If you insert a popup link to a popup topic in the same help file, and export this as a HTML Help file in "dual mode" (with formatted Winhelp popups, that is), Help & Manual automatically creates the necessary objects to the external HLP file. However, it works with IPP images only, not with the SHG format.What I actually need is to create a multi-window .chm help with popups containing formatted text and graphics.
The "dual mode" option is in Project | Properties -> HTML Help Export -> Popup Topics in HTML Help
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH
- Brian Lawes
- Posts: 4
- Joined: Fri Mar 26, 2004 5:43 pm
- Location: Idaho
I'm new at usergroups so please be kind
I'm trying to use the code Posted on Nov 27, 2003 7:42 from Alexander to open a link to a seperate .chm file. I get the following message
"The chmhelpfile.chm file is not a Windows Help file, or the file is corrupt."
I assume that this is caused by the use of the following Command.
<param name="Command" value="Winhelp">
What should I use in place of "Winhelp" to open HTMLhelp file? Please don't tell me it "HTMLhelp".
Then again it would be even simpler if I could just link the hotspot to a TopicID outside of the one in which the .ipp image is used. I could then use the same image multiple times (within the same or other helpfiles) without having to use this script.
I'm trying to use the code Posted on Nov 27, 2003 7:42 from Alexander to open a link to a seperate .chm file. I get the following message
"The chmhelpfile.chm file is not a Windows Help file, or the file is corrupt."
I assume that this is caused by the use of the following Command.
<param name="Command" value="Winhelp">
What should I use in place of "Winhelp" to open HTMLhelp file? Please don't tell me it "HTMLhelp".
Then again it would be even simpler if I could just link the hotspot to a TopicID outside of the one in which the .ipp image is used. I could then use the same image multiple times (within the same or other helpfiles) without having to use this script.
- Alexander Halser
- EC-Software Support
- Posts: 4106
- Joined: Mon Jun 24, 2002 7:24 pm
- Location: Salzburg, Austria
- Contact:
Brian,
you post confuses me a bit... first, which article do you refer to (this thread is about HLP files, not CHM) and second, when and where do you get this message? Does it have anything to do with hotspots in IPP images? Please open a new thread and explain your problem with more details.
you post confuses me a bit... first, which article do you refer to (this thread is about HLP files, not CHM) and second, when and where do you get this message? Does it have anything to do with hotspots in IPP images? Please open a new thread and explain your problem with more details.
Alexander Halser
Senior Software Architect, EC Software GmbH
Senior Software Architect, EC Software GmbH