Hi,
The code fragment below works for MS WORD.
However, I'd like to be able to launch other editors from a hyperlink with the target file to open as well.
Any suggestions?
Can it be done from within the hyperlink or do I need a Javascript?
<a href="javascript:startWord('c:/test/test.c')">
<script language='JavaScript'>
function startWord(strFile)
{
var myApp = new ActiveXObject('WordPad.Application');
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>
The code fragment below works for MS WORD.
However, I'd like to be able to launch other editors from a hyperlink with the target file to open as well.
Any suggestions?
Can it be done from within the hyperlink or do I need a Javascript?
<a href="javascript:startWord('c:/test/test.c')">
<script language='JavaScript'>
function startWord(strFile)
{
var myApp = new ActiveXObject('WordPad.Application');
if (myApp != null)
{
myApp.Visible = true;
myApp.Documents.Open(strFile);
}
}
</script>