How can I modify this code so I can open PDF files from the main CHM file and not just from the CHM the code is in?
I have a large help system that consists of 200+ CHMs that are merged into the main CHM. When I open the main CHM and navigate to the PDF link, click on it, the topic pane blanks out.
Thanks!
Code:
<script TYPE="TEXT/JAVASCRIPT" LANGUAGE="JAVASCRIPT">
function AcrobatLink( filename )
{
chmPrefix = "mk:@MSITStore:";
chmPath = document.URL.substring( 0, document.URL.indexOf( "::" ) );
filePosition =(chmPath.lastIndexOf("\\")>chmPath.lastIndexOf("/"))
?chmPath.lastIndexOf("\\"):chmPath.lastIndexOf("/");
pdfPath = unescape(chmPath.substring(chmPrefix.length,filePosition)+"/"+filename);
document.open("text/html");
document.write("<HTML><BODY LEFTMARGIN='0' TOPMARGIN='0' SCROLL='NO'>");
document.write("<EMBED WIDTH='100%' HEIGHT='100%' FULLSCREEN='yes' SRC='");
document.write( pdfPath + "'>" );
document.write("</BODY></HTML>");
document.close();
return;
}
</script>
I have a large help system that consists of 200+ CHMs that are merged into the main CHM. When I open the main CHM and navigate to the PDF link, click on it, the topic pane blanks out.
Thanks!