I am having issues displaying the data that I am getting from the JSONP service on another domain. I have been following the numerous tutorials and guides out there but can not get to the stage of displaying it on the webpage.
What I am trying to do is use javascript to display the returned JSON object on an HTML page.
I can see the JSON object being returned and I can actually view it using Fiddler, but I am just not able to get to the next stage and actually produce it on the page.
I have been following this example What is JSONP all about? more specifically the Twitter explanation and have been trying to adapt it to my own needs.
From what I understandmyCallback
that is at the end of the URL below refers to a function which I have to define.
<script src="http://twitter.com/status/user_timeline/padraicb.json?count=10&callback=myCallback"></script>
<script>
function myCallback(jsonData) {...}
<script>
If I am right so far how do I generically access the jsonData
and display everything on the page?
Can someone please give me a generic example of how to handle this, with an explanation on what they are doing?
I know this has been asked a 100 times but I just need to be pointed in the right direction. Thanks guys.