Advertise here




Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

XMLHTTPRequest issue

stealthv8stealthv8 Posts: 20Registered Users @
I don't know if I'm posting this in the right forum or not but I'm stuck on an XMLHttpRequest. I'm running a MAC OS X 10.9 server and hosting the page on the mac server. When ever a client goes to the page from a mac/pc computer the XML request works great. When the page is accessed from a mobile device: iPhone, iPad, & Andriod Tablet, the XML Http Request is ignored. Any help would be great! Below is my code:

<!DOCTYPE html>
<html lang="en-US">
<head>
<script type="text/javascript">
function doThing() {
var s = document.getElementById("mySlider");
var v = document.getElementById("myValue");
v.innerHTML = s.value;
}
function doUpdate() {
doThing();
var s = document.getElementById("mySlider");
client = new XMLHttpRequest();
client.open("GET", "http://172.16.42.2/analog/8/&quot; + s.value);
client.setRequestHeader("Cache-Control", "no-cache");
client.send();
}
</script>

<title>PWM Control</title>
</head>


<body>
PWM :<input type="range" id="mySlider" name="mySlider" min="0" max="255" value="0"
oninput="doThing();" onmouseup="doUpdate();">
<span id="myValue">0</span>
</body>
</html>
Newest App Released "RB Planner"
Sign In or Register to comment.