Solved

CHM file how to open a different topic for each page

Posted on 2009-05-10
9
462 Views
Last Modified: 2012-05-06
Hi i have an chm (html help file) on many pages on my website. the thing is i want the help file to open in a different topic according to the page the user opened the help file. does anyone know how to accomplish that ?

my current link is
<asp:Hyperlink id="hyperlink1" runat="server" navigateurl = "filename.chm">TEXT</asp:hyperlink>

how should the link be modified? or is it something i must do from the help file ?

thanks in advance
0
Comment
Question by:cooking
  • 7
  • 2
9 Comments
 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
See this article:  http://support.microsoft.com/kb/902225

You'll need to host the chm file on a file server which allows you to use a UNC file path vs a URL.
0
 

Author Comment

by:cooking
Comment Utility
yes that is for the known issue that doesn't open chm files at all . my question is if it is possible to open the chm file each time on a different topic according to the webpage i was viewing when i pressed the chm link
0
 
LVL 4

Accepted Solution

by:
CoveyCraig earned 500 total points
Comment Utility
Yes, if the website is hosted on an internal network.  The problem is that you cannot open a .chm file to a specific page using a web URL, it must be a file: type address.
0
 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
Here's an example of how to do it using an internal file URL.


<html>

	<head>

		<title>CHM Page Link</title>

	</head>

	<body>

		<A HREF = "mk:@MSITStore:C:\inetpub\wwwroot\Restricted%20Keywords.chm::/admin_home.htm" target="_blank">CHM Page Link</A>

	</body>

</html>

Open in new window

0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
Firefox requires an extension be installed to read .CHM files without downloading them.  Get the extension here:  http://sourceforge.net/project/showfiles.php?group_id=175748&package_id=201865&release_id=605434
0
 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
Here's a sample asp script which will do open the chm to a specific page contingent upon the original URL.


<%

strPage=Request.ServerVariables(URL)

SELECT CASE strPage

	CASE	"default.asp"

		Response.Redirect	"mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/default.htm"

	CASE	"forum.asp"

		Response.Redirect	"mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/forum.htm"

	CASE	"calendar.asp"

		Response.Redirect "mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/calendar.htm"

END SELECT

%>

Open in new window

0
 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
To use the routine as a Sub-Routine, you would append this code to the page from which you're calling it (or to an included file), then call it with "Call Helpfile" (not including quotation marks).


Sub	HelpFile

	strPage=Request.ServerVariables(URL)

	Select Case strPage

		Case	"default.asp"

			Response.Redirect	"mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/default.htm"

		Case	"forum.asp"

			Response.Redirect	"mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/forum.htm"

		Case	"calendar.asp"

			Response.Redirect "mk:@MSITStore:C:\inetpub\wwwroot\Helpfile.chm::/calendar.htm"

		Case Else

			Response.Redirect	"C:\inetpub\wwwroot\Helpfile.chm"

	End Select

End Sub

Open in new window

0
 

Author Comment

by:cooking
Comment Utility
so this works only in an internal network and not if the site is on the internet correct ?
0
 
LVL 4

Expert Comment

by:CoveyCraig
Comment Utility
Correct
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Swiper slider stops between pages 11 30
jquery contains method to look for a paragraph tag 2 23
Detecting robots? 5 33
SVG Star 4 16
Do you want to insert HTML5 video into your site? This is the tutorial how to do so. What are the main advantages of HTML5 video? 1) Have good compression, good image quality, and low decode processor use. 2) It is royalty-free 3) It is easi…
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now