Many thanks to all who helped on this one, in particular Phil and Michael. I've modifed Phil's code slightly to generate a slightly tidier toolbar-less popup window. Here it is in case anyone else would find it useful - to avoid attaching to the list, the code is as follows:
**************************************
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Alert Loader</title>
<script type="text/_javascript_">
<!--
function closeMe() {
self.opener="AnyValueToFoolBrowser";
self.close();
}
function getParam(name) {
var offset = 2;
var start=location.search.indexOf("?"+name+"=");
if (start<0) start=location.search.indexOf("&"+name+"=");
if (start<0) {
start=location.search.indexOf("%26"+name+"=");
offset = 4;
}
if (start<0) return '';
start += name.length+offset;
var end=location.search.indexOf("&",start)-1;
if (end<0) end=location.search.indexOf("%26", start)-1;
if (end<0) end=location.search.length;
var result=location.search.substring(start,end);
var result='';
for(var i=start;i<=end;i++) {
var c=location.search.charAt(i);
result=result+(c=='+'?' ':c);
}
return unescape(result);
}
function closeMe() {
self.opener="AnyValueToFoolBrowser";
self.close();
}
function dirtypop() {
var generator=window.open('','box','height=300,width=600,toolbar=no,scrollbars=no,menubar=no');
var heading1 = ("<h1>" + getParam("heading") + "</h1>\n")
var message1 = ("<p>" + getParam("message") + "</p>\n")
generator.document.write('<html><head><title>Popup</title>');
generator.document.write('<link rel="stylesheet" href="">);
generator.document.write('<style>');
generator.document.write('body { ');
generator.document.write('font-family: Verdana,Arial,Helv,sans-serif; font-size: 20pt; font-weight: bold; color: red; background-color: #DDDDDD; text-align: center;');
generator.document.write(' }');
generator.document.write('h1 { ');
generator.document.write('font-size: 26pt; font-weight: bold; background-color: #FFFFFF; border: html_2px html_solid #000000; padding: 10px;');
generator.document.write(' }');
generator.document.write('</style>');
generator.document.write('</head><body>');
generator.document.write(heading1);
generator.document.write(message1);
generator.document.write('</body></html>');
generator.document.close();
setTimeout('closeMe()', 12000);
setTimeout("window.open('','box').window.close()", 10000);
}
//-->
</script>
</head>
<BODY >"dirtypop()">
<script type="text/_javascript_">
</script>
</body>
</html>
*********************************
Copy this to a file called alert.htm. To make this run, generate an execute alert on each system as follows:
"C:\Program Files\Internet Explorer\IEXPLORE.EXE" http://yourdomain.com/alert.htm?heading=%p+is+%s&message=%e
You need to make the obvious substitution for http://yourdomain.com
Note that this isn't cross-browser certified - I just use IE. I was going to try to change the colours to green if the event is an "up" rather than a "down", but life is too short... 8-)
Cheers,
Ian
Ian K Gray
OEL IS - European Network Operations
Tel: +44 1236 502661
Mob: +44 7881 518854
Oki is proud to sponsor the "Oki European Challenge - 2005", the first truly democratic European yacht race.
For more information visit www.okieuropeanchallenge.com
