HelpNDoc 個人版http://www.helpndoc.com/を使用して HTML ドキュメントを作成しました。
提供されているデフォルトのテンプレートを使用しましたが、テンプレートは Google Chrome を除くほとんどすべてのブラウザーで適切に読み込まれますが、テンプレートは読み込まれません。
エラー:
Unsafe JavaScript attempt to access frame with URL file:///C:/Users/lenovo
/Documents /HelpNDoc/Output/html/testingproject.html from frame with URL
file:///C:/Users/lenovo/Documents/HelpNDoc/Output/html/toc.html. Domains,
protocols and ports must match.
toc.html:36
Uncaught TypeError: Cannot call method 'lastIndexOf' of undefined toc.html:36
Unsafe JavaScript attempt to access frame with URL file:///C:/Users/lenovo
/Documents/HelpNDoc/Output/html/toc.html from frame with URL file:///C:/Users
/lenovo/Documents/HelpNDoc/Output/html/Introduction.html. Domains, protocols and
ports must match.
Introduction.html:27
Unsafe JavaScript attempt to access frame with URL file:///C:/Users/lenovo
/Documents/HelpNDoc/Output/html/toc.html from frame with URL file:///C:/Users
/lenovo/Documents/HelpNDoc/Output/html/Systemrequirements.html. Domains,
protocols and ports must match.
Systemrequirements.html:27
Unsafe JavaScript attempt to access frame with URL file:///C:/Users/lenovo
/Documents/HelpNDoc/Output/html/toc.html from frame with URL file:///C:/Users/lenovo
/Documents/HelpNDoc/Output/html/Gettinghelp.html. Domains, protocols and ports
must match.
Gettinghelp.html:27
toc.html のように見えます-36 行目の前とその後にコンテンツを追加しています
<script type="text/javascript" src="js/searchdata.js"></script>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.8.17.custom.min.js"></script>
<script type="text/javascript" src="js/jquery.cookie.js"></script>
<script type="text/javascript" src="js/jquery.dynatree.min.js"></script>
<script type="text/javascript" src="js/hndjsse.js"></script>
<script type="text/javascript">
var bSearchDataLoaded = true;
var sHelpIdToActivate = '';
$(document).ready(function()
{
var sAnchorName =
top.location.href.substring(top.location.href.lastIndexOf("#") + 1,
top.location.href.length);
var nSelectedTab = 0;
if (sAnchorName == '_index') nSelectedTab = 1
else if (sAnchorName == '_search') nSelectedTab =
2;
$("#tabs").tabs({
selected: nSelectedTab,
select: function(event, ui) { HideKwPopup(); }
});
// Toc
$("#tab-toc").dynatree({
clickFolderMode: 1,
debugLevel: 0,
imagePath: 'css/dynatree/chm/',
onActivate: function(node){
if ($("#tab-keywords") && $("#tab-
keywords").dynatree && $("#tab-keywords").dynatree("getTree") && $("#tab-
keywords").dynatree("getTree").activateKey)
$("#tab-
keywords").dynatree("getTree").activateKey(null);
if(node.data.href && node.data.href != '#'){
window.open(node.data.href,
node.data.target);
}
}
});
Introduction.html は次のようになります-27 行目の前後に行を追加しました
</style>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript"><!--
if (top.frames.length == 0)
{
var sTopicUrl =
top.location.href.substring(top.location.href.lastIndexOf("/") + 1,
top.location.href.length);
top.location.href = "testingproject.html?" + sTopicUrl;
}
else if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("Introduction");
}
</script>
</head>
システム要件.htmlは次のようになります
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript"><!--
if (top.frames.length == 0)
{
var sTopicUrl =
top.location.href.substring(top.location.href.lastIndexOf("/") + 1,
top.location.href.length);
top.location.href = "testingproject.html?" + sTopicUrl;
}
else if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("Systemrequirements");
}
</script>
</head>
tinghelp.html は次のようになります -
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/hnd.js"></script>
<script type="text/javascript"><!--
if (top.frames.length == 0)
{
var sTopicUrl =
top.location.href.substring(top.location.href.lastIndexOf("/") + 1,
top.location.href.length);
top.location.href = "testingproject.html?" + sTopicUrl;
}
else if (top && top.FrameTOC && top.FrameTOC.SelectTocItem)
{
top.FrameTOC.SelectTocItem("Gettinghelp");
}
</script>
</head>
どんな助けでも大歓迎です。ありがとうエディ