I'm utilizing the Youtube Data API, and following the guide for JSON. Youtube recommends that you utilize a "script" tag to call the service and you specify a callback function. Instructions provided here: https://developers.google.com/youtube/2.0/developers_guide_json.
EXAMPLE
<script type="text/javascript"
src="http://gdata.youtube.com/feeds/users/GoogleDevelopers/uploads?callback=showMyVideos&v=2&alt=json-in-script&format=5">
</script>
Which would call:
function showMyVideos(data) {...}
Notice the query string in the script tag specifies the parameter "callback=showMyVideos".
QUESTION
My question is whether its possible to pass through a variable to my callback function that I manually specify?
What I would like to do is something like "callback=showMyVideos(id,data)"
which would call:
function showMyVideos(id,data){...}
where "id" is set by me in the tag, and the "data" is what is returned by the call to youtube.
The reason I need to do this is so I can insert the Youtube video that is returned from the Youtube API to the the div with the id that I'm passing through.