MoshiachNow
IS-IT--Management
HI,
I need to handle multiple onerror events,and display DIFFERENT messages.
The code is like:
<LI><a HREF="Javascript:void(0)" onclick="Run2('dbviewer.exe d:/temp/POD/DBfiles/PopupMessages.mdb');" >PopupMessages.mdb</A></li>
<LI><a HREF="Javascript:void(0)" onclick="Run('TraceDecoder.exe d:/temp/POD/TraceOutput');" >TraceDecoder</A></li>
#######################
I was trying to achieve the goal by defining "Run" and "Run2" separate functions with separate errors (see below),but the system always shows just the latest defined function ...Will appreciate help.The functions are:
#######################
<script language='javascript'>
function Run(what){
WSH = new ActiveXObject("WScript.Shell");
WSH.Run(what);
}
onerror=handleErr
var txt=""
function handleErr(msg,url,l)
{
txt="DBViewer.exe was not found on your desktop !\n\n"
alert(txt)
return true
}
</SCRIPT>
<script language='javascript'>
function Run2(what){
WSH1 = new ActiveXObject("WScript.Shell");
WSH1.Run2(what);
}
onerror=handleErr2
var txt2=""
function handleErr2(msg,url,l)
{
txt2="DBViewer.exe was not found on your system !\n\n"
txt2+=".mdb files can be viewed on DFE only.\n\n"
alert(txt2)
return true
}
</SCRIPT>
Long live king Moshiach !
I need to handle multiple onerror events,and display DIFFERENT messages.
The code is like:
<LI><a HREF="Javascript:void(0)" onclick="Run2('dbviewer.exe d:/temp/POD/DBfiles/PopupMessages.mdb');" >PopupMessages.mdb</A></li>
<LI><a HREF="Javascript:void(0)" onclick="Run('TraceDecoder.exe d:/temp/POD/TraceOutput');" >TraceDecoder</A></li>
#######################
I was trying to achieve the goal by defining "Run" and "Run2" separate functions with separate errors (see below),but the system always shows just the latest defined function ...Will appreciate help.The functions are:
#######################
<script language='javascript'>
function Run(what){
WSH = new ActiveXObject("WScript.Shell");
WSH.Run(what);
}
onerror=handleErr
var txt=""
function handleErr(msg,url,l)
{
txt="DBViewer.exe was not found on your desktop !\n\n"
alert(txt)
return true
}
</SCRIPT>
<script language='javascript'>
function Run2(what){
WSH1 = new ActiveXObject("WScript.Shell");
WSH1.Run2(what);
}
onerror=handleErr2
var txt2=""
function handleErr2(msg,url,l)
{
txt2="DBViewer.exe was not found on your system !\n\n"
txt2+=".mdb files can be viewed on DFE only.\n\n"
alert(txt2)
return true
}
</SCRIPT>
Long live king Moshiach !