I had this error on my console log:
XMLHttpRequest cannot load http://example.com/jsonconnect1.php. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'null' is therefore not allowed access.
I know there are tons of this question had been asked but all of them use 'ajax' called whereby my code is using getjson
$(document).ready(function(){
var url="http://example.com/jsonconnect1.php";
$.getJSON(url,function(json){
// loop through the members here
$.each(json.members,function(i,dat){
$("#msg").append(
'<div class="members">'+
'<h1>'+dat.id+'</h1>'+
'<p>Firstname : <em>'+dat.username+'</em>'+
'<p>SurName : <em>'+dat.mobileno+'</em></p>'+
'<p>Title : <strong>'+dat.total+'</strong></p>'+
'<hr>'+
'</div>'
);
Any thoughts? thanks.