My JavaScript code is designed to call a URL that belongs to the same website, so I'm puzzled as to why it's being flagged as "cross-origin".
This is the AJAX call in my code:
$.ajax({
url: SITE_URL+'ajax_check.php?p='+P_ID,
//assuming SITE_URL is http://example.com/dev
success:function(result){
alert(result);
}
});
However, when I check the console in Firebug, I see this error message:
"Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://example.com/dev/ajax_check.php?p=23. This issue can be resolved by either moving the resource to the same domain or enabling CORS."