I have this very basic webpage that makes an AJAX call to a aspx file.
It all works great on my development machine. But when I test it on the production machine I get nohting nor any kind of error.
I have different IP addresses's and port number's between the two machines. But I have checked that these differences are handled.
The page displays ok and reponds to the click event ok.
The production machine worked once when setup as localhost for the call but once I changed that, it stopped. I have rechecked ip and port and they are correct.
I have copied the file a couple of times in case of corruption.
The only thing I can think is the port number is 20201, is this something I shouldn't use.
The dev machine is win7 target is xp, both running xampp.
It is supposed to be a custom page for home automation, the Ajax call is to speak to some software called homeseer.
Where or what can I change to see whats wrong.
I am puzzled as all works great in test and I get nothing positive or negative in the production world.
many thanks for any help.
<!DOCTYPE html>
<html>
<head>
<Script type="text/javascript" src="jquery/jquery-1.7.1.js"></script>
<script>
$(document).ready(function(){
$("button").click(function(){
alert($(this).parent().attr("class"));
var $x10Device = $(this).parent().attr("class");
$.ajax({
type: 'GET',
url: "http://192.168.0.34:81/tenHsServer/tenHsServer.aspx",
data: {
t: "ab",
f: "ToggleDevice" ,
d:$x10Device
}
});
});
});
</script>
</head>
<body>
<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>
<SPAN class='C8'><button>8Get External Content</button></SPAN>
<SPAN class='C1'><button>1Get External Content</button></SPAN>
<SPAN class='C2'><button>2Get External Content</button></SPAN>
<SPAN class='C3'><button>3Get External Content</button></SPAN>
<SPAN class='C4'><button>4Get External Content</button></SPAN>
<SPAN class='C5'><button>5Get External Content</button></SPAN>
</body>
</html>