HI i have call a json file and show some error can u please help me
show error Uncaught ReferenceError: marketlivedata is not defined
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<!DOCTYPE html>
<html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:g="http://base.google.com/ns/1.0">
<head>
<title>Data Call to json</title>
<script type="text/javascript">
// =====================
$(document).ready(function(e) {
// alert('hello');
// var marketlivedata ;
});
// =====================
function getUserData() {
$.ajax({
type: "GET",
url: "http://xxxxxxxxx.xxxxxxx.com/xxxxxxx.json",
dataType: 'jsonp',
crossDomain: true,
success: function(data) {
// $('#ajexLoaderSec').hide();
console.log(data);
},
error: function(e) {
alert("There is an error while connecting to the server. Please try after some time");
}
});
};
getUserData();
</script>
</head>
<body>
gsdf sdf sdfsd sdf sd
</body>
</html>
See Question&Answers more detail:os