alert sound in html output

All questions related to installations, configurations and maintenance of Advanced Host Monitor (including additional tools such as RMA for Windows, RMA Manager, Web Servie, RCC).
Post Reply
menno
Posts: 158
Joined: Fri May 21, 2010 1:27 am

alert sound in html output

Post by menno »

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
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

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

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 -->
Note: you may need to change path to your WAV file.

Regards
Alex
menno
Posts: 158
Joined: Fri May 21, 2010 1:27 am

THANKX...but close

Post by menno »

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:

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 -->
KS-Soft
Posts: 13012
Joined: Wed Apr 03, 2002 6:00 pm
Location: USA
Contact:

Post by KS-Soft »

You are right, its better to get WAV file from web site

Regards
Alex
Post Reply