hi ya all
is it possible to write a header file that will sound an dead.wav when some tests are bad/down/unknow ect ect ???
i look all over the forum and did some searching but did not find it
i hope you can help me
thankx
menno
alert sound in html output
I assume you are asking about HTML reports that can be generated by HostMonitor?
It depends on what exactly web browser do you use.
E.g. you may add the following script into custom header
Note: you may need to change path to your WAV file.
Regards
Alex
It depends on what exactly web browser do you use.
E.g. you may add the following script into custom header
Code: Select all
<!-- START SOUND CODE -->
<script language="JavaScript" type="text/javascript">
if (%BadTests%>0) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.write('<bgsound src="C:\\Program Files\\HostMonitor8\\dead.wav" loop="false">');
}
else {
document.write('<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer" src="C:\\Program Files\\HostMonitor8\\dead.wav" autostart="true" showstatusbar="0" showcontrols="0" showdisplay="0" volume="1" height="1" width="1" loop="false"><br>');
}
}
// End -->
</script>
<!-- END SOUND CODE -->
Regards
Alex
THANKX...but close
thankx...it allmost works...
i changed indeed the path to the dead.wav file. ..but besides that it works like a charm !!! thanks for that
here is my code:
i changed indeed the path to the dead.wav file. ..but besides that it works like a charm !!! thanks for that
here is my code:
Code: Select all
<html><head>
<meta name="GENERATOR" content="KS-Soft HostMonitor">
<META HTTP-EQUIV="REFRESH" CONTENT="60">
<title>HostMonitor report</title>
<STYLE TYPE="text/css"><!-- a:hover { color: "%ALinkColor%"; } --> </STYLE>
</head>
<body bgcolor="%BgColor%" text="%TextColor%" link="%LinkColor%" vlink="%VLinkColor%"
alink="%ALinkColor%">
<p align="left"><u><strong><big><big>HostMonitor Report</big></big><br>
</strong></u><font face="Arial">Generated on %Date% at %Time%</font></p>
<div align="center"><center>
<table border="0" bordercolor="#00008C" width="100%" >
<!-- START SOUND CODE -->
<script language="JavaScript" type="text/javascript">
if (%BadTests%>0) {
if (navigator.appName == "Microsoft Internet Explorer") {
document.write('<bgsound src="http://hostmonitor/sounds/dead.wav" loop="false">');
}
else {
document.write('<embed type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer"
src="C:\\Program Files\\HostMonitor8\\dead.wav" autostart="true" showstatusbar="0"
showcontrols="0" showdisplay="0" volume="1" height="1" width="1" loop="false"><br>');
}
}
// End -->
</script>
<!-- END SOUND CODE -->