echo '<script type="text/javascript">'
echo 'function sendButton( onoff, btn )'
echo '{'
-echo 'var req = new XMLHttpRequest();'
-echo 'url = "http://slug.realraum.at/cgi-bin/switch.cgi?power="+onoff+"&id="+btn;'
-echo 'req.open("GET", url ,false);'
-echo 'req.send(null);'
+echo ' var req = new XMLHttpRequest();'
+echo ' url = "http://slug.realraum.at/cgi-bin/switch.cgi?power="+onoff+"&id="+btn;'
+echo ' req.open("GET", url ,false);'
+echo ' //google chrome workaround'
+echo ' req.setRequestHeader("googlechromefix","");'
+echo ' req.send(null);'
echo '}'
echo '</script>'
echo "</head>"
var req = new XMLHttpRequest();
url = "http://slug.realraum.at/cgi-bin/switch.cgi?power=send&id="+btn;
req.open("GET", url ,false);
+ //google chrome workaround
+ req.setRequestHeader("googlechromefix","");
req.send(null);
//response = req.responseText;
//document.getElementById('output').innerHTML = response;