I have the following code that retrieves Json data:
<script type="text/javascript">
$(document).ready(
function(){
$.getJSON(
'./json.txt',
function(data){
for(i=0; i<data.length; i++){
var content = '<li>';
content += data[i].fname + ' ' + data[i].lname;
content += '</li>';
$('ul.rubrica').append(content);
}
}
);
}
);
</script>
<ul class="rubrica">
</ul>
And the json data:
[
{
"fname" : "<a href='http://www.riccardo.it'>Piottino</a>",
"lname" : "Mr Potato"
}
]
Now I have the json in another server: http://www.site.com/json.txt How can I use jsonP to get the content like I did before? Tnx in advance
--Edit: Since I see I have to use a server side language, how can I do it with asp.net?