i am using this code to get my ustream status.
<font color='red'><span id="status">status</span></font>
<script type="text/javascript">
function set_status(status)
{
if (status == "offline")
{
document.getElementById("status").innerHTML =
"offline";
}
else if (status == "live")
{
document.getElementById("status").innerHTML =
"LIVE";
}
else
{
document.getElementById("status").innerHTML =
"Error getting stream status!";
}
}
</script>
<script type="text/javascript"
src="http://api.ustream.tv/html/channel/codtelevision/getValueOf/status?key=MY KEY CODE=set_status">
</script>
for some reason nothing happens. I am using jsfiddle.net for my testing..if that helps. here is a link to my code:
In your JSFiddle, Javascript comments use
//or/**/comments, not<!---->. This results in a syntax error which causes the code to be ignored.After removing the comments, you get: