Howdy again,,
Done some coding on the issue with code not working on IE/Android.
Can somebody guide me in AJAX

I would like the buttons to change colour according to server return value. WEBIOPI returns 1 for on and 0 for off sa you know but how do i read that ?
Have searched alot for simple AJAX but it is often tooooo confusing. I can send the post with this code on both IE & Android.
Neither CSS or AJAX is my skill
<html>
<head>
<title>the title</title>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="webiopi.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
$("#on").click(function(event){
$.post(
"/webiopi/GPIO/4/value/0",
function(data) {
$('#stage').html(data);
}
);
});
$("#off").click(function(event){
$.post(
"/webiopi/GPIO/4/value/1",
function(data) {
$('#stage').html(data);
$dta = data;
}
);
});
});
</script>
</head>
<body>
<p>Click on the button to load result.html file:</p>
<div id="stage" style="background-color:white;">
STAGE
</div>
<input type="button" id="on" value="On" />
<script type="text/javascript" language="javascript"> if($dta == "1"){document.write("test");}</script>
<input type="button" id="off" value="Off" style="color:red;" />
</body>
</html>