I'm writing code with jquery. The code is not working to localhost and server.
$.post("http://www.example",function(reply){
alert(23);
});
The same problem applies to the get, ajax functions.
I tried it with ajax. It happened. The Ajax command does not work at all. url wants to attract information from different site. Could this be the reason for not working?
my problem is still going on. I am no getting its data. The code I wrote is below.
var url="http://example.comm?city=london";//this site is get the data I sent. it return as text.
$.ajax({
url:url,
type:"get",
dataType:"jsonp",
jsonp:"callback",
success:function(value){
$("#abc").text(value);
},
error:function(reply){
alert(reply);//alert reslut:"<object></object>"
},
});