| <html>
|
| <head>
|
| <meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
| <meta http-equiv="author" content="Rui Pereira">
|
| <meta http-equiv="description" content="Controlo Remoto da Casa">
|
| <meta http-equiv="refresh" content="15">
|
| <title>Caldeira</title>
|
| <script language="Javascript">
|
|
|
| function xmlhttpPost(strURL) {
|
| var xmlHttpReq = false;
|
| var self = this;
|
| // Mozilla/Safari/firefox/chrome
|
| if (window.XMLHttpRequest) {
|
| self.xmlHttpReq = new XMLHttpRequest();
|
| }
|
| // Internet Explorer
|
| else if (window.ActiveXObject) {
|
| self.xmlHttpReq = new ActiveXObject("Microsoft.XMLHTTP");
|
| }
|
| self.xmlHttpReq.open('POST', strURL, true);
|
| self.xmlHttpReq.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');
|
| self.xmlHttpReq.onreadystatechange = function() { if (self.xmlHttpReq.readyState == 4) { updatepage(self.xmlHttpReq.responseText); }
|
| }
|
| self.xmlHttpReq.send(getquerystring());
|
| }
|
|
|
| function getquerystring() {
|
| var form = document.forms['casa'];
|
| var valor = form.assoalhada.value;
|
| qstr = 'assoalhada=' + escape(valor); // NOTE: no '?' before querystring
|
| return qstr;
|
| }
|
| function updatepage(str){
|
| document.getElementById("estado").innerHTML = str;
|
| } |