Hi,
I've made an epub library in Moss 2007 to store epub for my company.
I have associated an hyperlink in the context menu to open the epub with Sygil
I put some javascript behind this hyperlink :
Code:
<script language="javascript">
function openEpub(cmdline, params) {
var fso = new ActiveXObject("Scripting.FileSystemObject");
fileExist = fso.FileExists(cmdline);
if (!fileExist) {
alert("The requested application is not installed.");
}
else {
var shell = new ActiveXObject( "WScript.Shell" );
if (params) {
params = ' ' + params;
}
else {
params = '';
}
shell.Run('"' + cmdline + '"' + params);
}
}
function Custom_AddDocLibMenuItems(m, ctx)
{
setDocType();
var strDisplayTextCustom = "epub1";
strOpenEpub = "javascript:openEpub('C:\\\\Program Files (x86)\\\\Sigil\\\\Sigil.exe' , '\"http://ofosvspdw:17000/Teams/epub library/Underground-MURAKAMI.epub\"')";
var strImagePath = '';
// Add menu item
CAMOpt(m, strDisplayTextCustom, strOpenEpub , strImagePath);
// add a separator to the menu
CAMSep(m);
return false;
}
</script>
When I click, it opens Sygil but not the file and I have the following error :
Has someone any idea of how resolve this ?
Thank you