I am very new to using jQuery so please bear with me. I am using a line of code found online. The code works when uploaded to my gatorhost server, bit not when testing on my local computer.
Both the index.html file and the ajax.html (the file being loaded) are in the same folder both on my hard drive and on my host server. I get "0 error"
<div id="success"></div>
<b>Error Response:</b>
<div id="error"></div>
<script>
$( "#success" ).load( "ajax.html #newimage", function( response, status, xhr ) {
if ( status == "error" ) {
var msg = "Sorry but there was an error: ";
$( "#error" ).html( msg + xhr.status + " " + xhr.statusText );
}
});
</script>