I am trying to implement jsonp with jQuery but it is not working I did see the example in jsonp with jquery
But in my case it is always making ajax call I am appending &callback=? at the end
I construct relative url like
var url="/pbs/getTraits.do"+ $('#pbstraits').serialize()+"&callback=?"; $.getJSON(url, null, function(data){ document.getElementById("msg").innerHTML = data.message; }); is this the right way of doing it?
Also when I am sending query parameters along with url I have to encode which is the best way to do it.