Okay so I will attempt to publish everything here.
code on SD card :-
<html>
<head>
<script>
function GetArduinoInputs()
{
nocache = "&nocache=" + Math.random() * 1000000;
var request = new XMLHttpRequest();
request.onreadystatechange = function()
{
if (this.readyState == 4) {
if (this.status == 200) {
if (this.responseXML != null) {
document.getElementById("val0").innerHTML =
this.responseXML.getElementsByTagName('analog')[0].childNodes[0].nodeValue;
document.getElementById("val1").innerHTML =
this.responseXML.getElementsByTagName('analog')[1].childNodes[0].nodeValue;
document.getElementById("val2").innerHTML =
this.responseXML.getElementsByTagName('analog')[2].childNodes[0].nodeValue;
document.getElementById("val3").innerHTML =
this.responseXML.getElementsByTagName('analog')[3].childNodes[0].nodeValue;
}
}
}
}
request.open("GET", "ajax_inputs" + nocache, true);
request.send(null);
setTimeout('GetArduinoInputs()', 400);
}
</script>
<style type="text/css">
.cust2 {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 500px;}
.cust2 td, .cust2 th {
border: 1px solid #ddd;
padding: 5px;}
.cust2 tr:nth-child(even){background-color: #f2f2f2;}
.cust2 th {
padding-top: 9px;
padding-bottom: 9px;
text-align: left;
background-color: LightSalmon;
color: white;}
</style>
</head>
<body onload="GetArduinoInputs()">
<table class="cust2">
<br />
<th>Relays Alarm Errors</th>
<th>State</th>
<tr><td>Relay 1</td>
<td><b><span id="val0">...</b></span>
</td></tr>
<tr><td>Relay 2</td>
<td><b><span id="val1">...</b></span>
</td></tr>
<tr><td>Alarm</td>
<td><b><span id="val2">...</b></span>
</td></tr>
<tr><td>Error</td>
<td><b><span id="val3">...</b></span>
</td></tr>
</table>