Friday, 15 April 2016

javascript - XMLHttpRequest; Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https, chrome-extension-resource

When I try to do a ajax call, I got the error on chrome below.




XMLHttpRequest cannot load javascript:;. Cross origin requests are
only supported for protocol schemes: http, data, chrome,
chrome-extension, https, chrome-extension-resource.




Here is code:




$.ajax({
type: "POST",
data: {pvalue : pid},
cache: false,
url: "xxx.in/yy/ajax.php",
success: function(data)
{
$modal.find('.edit-content').html(data);
}

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...