I keep getting error on line 159 object expected.
Can anyone help please??
the text in the .js files is just one line.
sp1Data[0]="|green|"
If I strip everything out an only use one table and array for one item it works ok??
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Monitoring Screen</title>
<meta http-equiv="refresh" content="60">
<script>
var sp1Data=new Array();
</script>
<script src=http://www.webdeveloper.com/forum/archive/index.php/"/js/logs/edssp1.js">
</script>
<script>
var sp1Array=sp1Data[0].split("|");
var sp1Status=sp1Array[1];
</script>
<script>
var sp2Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp2.js">
</script>
<script>
var sp2Array=sp2Data[0].split("|");
var sp2Status=sp2Array[1];
</script>
<script>
var sp3Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp3.js">
</script>
<script>
var sp3Array=sp3Data[0].split("|");
var sp3Status=sp3Array[1];
</script>
<script>
var sp4Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp4.js">
</script>
<script>
var sp4Array=sp4Data[0].split("|");
var sp4Status=sp4Array[1];
</script>
<script>
var sp5Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp5.js">
</script>
<script>
var sp5Array=sp5Data[0].split("|");
var sp5Status=sp5Array[1];
</script>
<script>
var sp6Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp6.js">
</script>
<script>
var sp6Array=sp6Data[0].split("|");
var sp6Status=sp6Array[1];
</script>
<script>
var ed1Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsed1.js">
</script>
<script>
var ed1Array=ed1Data[0].split("|");
var ed1Status=ed1Array[1];
</script>
<script>
var ed2Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsed2.js">
</script>
<script>
var ed2Array=ed2Data[0].split("|");
var ed2Status=ed2Array[1];
</script>
<script>
var dr1Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsdr1.js">
</script>
<script>
var dr1Array=drData[0].split("|");
var dr1Status=dr1Array[1];
</script>
<script>
function setColour() {
var cell_green="#00ff00";
var cell_red="#ff0000";
if (sp1Status == "red") {
document.all.SP1.style.backgroundColor=cell_red
}
else {
document.all.SP1.style.backgroundColor=cell_green
}
};
if (sp2Status == "red") {
document.all.SP2.style.backgroundColor=cell_red
}
else {
document.all.SP2.style.backgroundColor=cell_green
}
};
if (sp3Status == "red") {
document.all.SP3.style.backgroundColor=cell_red
}
else {
document.all.SP3.style.backgroundColor=cell_green
}
};
if (sp4Status == "red") {
document.all.SP4.style.backgroundColor=cell_red
}
else {
document.all.SP4.style.backgroundColor=cell_green
}
};
if (sp5Status == "red") {
document.all.SP5.style.backgroundColor=cell_red
}
else {
document.all.SP5.style.backgroundColor=cell_green
}
};
if (sp6Status == "red") {
document.all.SP6.style.backgroundColor=cell_red
}
else {
document.all.SP6.style.backgroundColor=cell_green
}
};
if (ed1Status == "red") {
document.all.ED1.style.backgroundColor=cell_red
}
else {
document.all.ED1.style.backgroundColor=cell_green
}
};
if (ed2Status == "red") {
document.all.ED2.style.backgroundColor=cell_red
}
else {
document.all.ED2.style.backgroundColor=cell_green
}
};
if (dr1Status == "red") {
document.all.DR1.style.backgroundColor=cell_red
}
else {
document.all.DR1.style.backgroundColor=cell_green
}
};
}
</script>
</head>
<body onLoad="setColour()">
<center>
<h2>EDS SUN SOLARIS MONITORING SCREEN</h2>
</center>
<div align="center">
<center>
<table border="1" width="50%" cellspacing="0" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000">
<tr>
<td width="244" align="center"><a href="sp1.html"><b><font face="Verdana" size="3">EDSCPCUXSP1</font></b></a></td>
<td width="244" align="center" id="SP1" name="SP1" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp2.html">EDSCPCUXSP2</a></font></b></td>
<td width="244" align="center" id="SP2" name="SP2" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp3.html">EDSCPCUXSP3</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp4.html">EDSCPCUXSP4</a></font></b></td>
<td width="244" align="center" id="SP4" name="SP4" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp5.html">EDSCPCUXSP5</a></font></b></td>
<td width="244" align="center" id="SP5" name="SP5" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp6.html">EDSCPCUXSP6</a></font></b></td>
<td width="244" align="center" id="SP6" name="SP6" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="ed1.html">EDSCPCUXED1</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="ed2.html">EDSCPCUXED2</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="dr1.html">EDSCPCUXDR1</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
</table>
</center>
</body>
</html>
Regards
Ian
Can anyone help please??
the text in the .js files is just one line.
sp1Data[0]="|green|"
If I strip everything out an only use one table and array for one item it works ok??
<html>
<head>
<meta http-equiv="Content-Language" content="en-gb">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Monitoring Screen</title>
<meta http-equiv="refresh" content="60">
<script>
var sp1Data=new Array();
</script>
<script src=http://www.webdeveloper.com/forum/archive/index.php/"/js/logs/edssp1.js">
</script>
<script>
var sp1Array=sp1Data[0].split("|");
var sp1Status=sp1Array[1];
</script>
<script>
var sp2Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp2.js">
</script>
<script>
var sp2Array=sp2Data[0].split("|");
var sp2Status=sp2Array[1];
</script>
<script>
var sp3Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp3.js">
</script>
<script>
var sp3Array=sp3Data[0].split("|");
var sp3Status=sp3Array[1];
</script>
<script>
var sp4Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp4.js">
</script>
<script>
var sp4Array=sp4Data[0].split("|");
var sp4Status=sp4Array[1];
</script>
<script>
var sp5Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp5.js">
</script>
<script>
var sp5Array=sp5Data[0].split("|");
var sp5Status=sp5Array[1];
</script>
<script>
var sp6Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edssp6.js">
</script>
<script>
var sp6Array=sp6Data[0].split("|");
var sp6Status=sp6Array[1];
</script>
<script>
var ed1Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsed1.js">
</script>
<script>
var ed1Array=ed1Data[0].split("|");
var ed1Status=ed1Array[1];
</script>
<script>
var ed2Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsed2.js">
</script>
<script>
var ed2Array=ed2Data[0].split("|");
var ed2Status=ed2Array[1];
</script>
<script>
var dr1Data=new Array();
</script>
<script src="http://207.37.139.130/js/logs/edsdr1.js">
</script>
<script>
var dr1Array=drData[0].split("|");
var dr1Status=dr1Array[1];
</script>
<script>
function setColour() {
var cell_green="#00ff00";
var cell_red="#ff0000";
if (sp1Status == "red") {
document.all.SP1.style.backgroundColor=cell_red
}
else {
document.all.SP1.style.backgroundColor=cell_green
}
};
if (sp2Status == "red") {
document.all.SP2.style.backgroundColor=cell_red
}
else {
document.all.SP2.style.backgroundColor=cell_green
}
};
if (sp3Status == "red") {
document.all.SP3.style.backgroundColor=cell_red
}
else {
document.all.SP3.style.backgroundColor=cell_green
}
};
if (sp4Status == "red") {
document.all.SP4.style.backgroundColor=cell_red
}
else {
document.all.SP4.style.backgroundColor=cell_green
}
};
if (sp5Status == "red") {
document.all.SP5.style.backgroundColor=cell_red
}
else {
document.all.SP5.style.backgroundColor=cell_green
}
};
if (sp6Status == "red") {
document.all.SP6.style.backgroundColor=cell_red
}
else {
document.all.SP6.style.backgroundColor=cell_green
}
};
if (ed1Status == "red") {
document.all.ED1.style.backgroundColor=cell_red
}
else {
document.all.ED1.style.backgroundColor=cell_green
}
};
if (ed2Status == "red") {
document.all.ED2.style.backgroundColor=cell_red
}
else {
document.all.ED2.style.backgroundColor=cell_green
}
};
if (dr1Status == "red") {
document.all.DR1.style.backgroundColor=cell_red
}
else {
document.all.DR1.style.backgroundColor=cell_green
}
};
}
</script>
</head>
<body onLoad="setColour()">
<center>
<h2>EDS SUN SOLARIS MONITORING SCREEN</h2>
</center>
<div align="center">
<center>
<table border="1" width="50%" cellspacing="0" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#000000">
<tr>
<td width="244" align="center"><a href="sp1.html"><b><font face="Verdana" size="3">EDSCPCUXSP1</font></b></a></td>
<td width="244" align="center" id="SP1" name="SP1" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp2.html">EDSCPCUXSP2</a></font></b></td>
<td width="244" align="center" id="SP2" name="SP2" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp3.html">EDSCPCUXSP3</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp4.html">EDSCPCUXSP4</a></font></b></td>
<td width="244" align="center" id="SP4" name="SP4" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp5.html">EDSCPCUXSP5</a></font></b></td>
<td width="244" align="center" id="SP5" name="SP5" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="sp6.html">EDSCPCUXSP6</a></font></b></td>
<td width="244" align="center" id="SP6" name="SP6" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="ed1.html">EDSCPCUXED1</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="ed2.html">EDSCPCUXED2</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
<tr>
<td width="244" align="center"><b><font face="Verdana" size="3"><a href="dr1.html">EDSCPCUXDR1</a></font></b></td>
<td width="244" align="center" id="SP3" name="SP3" style="background:#00FF00"> </td>
</tr>
</table>
</center>
</body>
</html>
Regards
Ian