google chrome fix
[svn42.git] / powersensordaemon / switch.cgi
index 58147d9..ee8074e 100755 (executable)
@@ -83,10 +83,12 @@ echo "<title>Realraum rf433ctl</title>"
 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>"