Using a HelpProvider, go to a specific anchor tag on a page.

  • Thread starter Thread starter Marcel Brekelmans
  • Start date Start date
M

Marcel Brekelmans

Hello,

So far I have my .CHM file working with my application through a
HelpProvider. But, I would like to display certain locations on a page
immediately. For instance, I have a page 'DataEntry.htm' in my helpfile
'DataEntry.chm' with a paragraph about a subject called "Supplementary
Data". I have marked that paragraph with an anchor tag <a
name="#SupplementaryData">.

In a web browser, going to that location works just fine: the location
file://DataEntry.htm#SupplementaryData takes me to that page and goes right
to the paragraph. However, referring to it with the HelpProvider.SetKeyword
method doesn't work:

hlpDataEntry.HelpNamespace = "c:\\DataEntry.chm";
hlpDataEntry.SetHelpNavigator(txtSupplementaryData, HelpNavigator.Topic);

hlpDataEntry.SetHelpKeyword(txtSupplementaryData,
"DataEntry.htm#SupplementaryData");

These lines of code take me to the 'DataEntry.htm' page, but don't jump to
the specified paragraph. Is there a way to achieve this?

With regards,
Marcel Brekelmans
 
Marcel,
So far I have my .CHM file working with my application through a
HelpProvider. But, I would like to display certain locations on a page
immediately. For instance, I have a page 'DataEntry.htm' in my helpfile
'DataEntry.chm' with a paragraph about a subject called "Supplementary
Data". I have marked that paragraph with an anchor tag <a
name="#SupplementaryData">.

Here's a discussion in the Help & Manual forums that may help:

http://helpman.it-authoring.com/viewtopic.php?t=2506
 
Thanks, Pete

The article you mentioned put me on the right track. Not the solution
in itself, I was on the right track. But I made the mistake to put the
'#' sign inside the <a> tag. It should read :<a name
="SupplementaryData">. And that made it work. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top