thanks, ill study that code for a future application i can foresee already. As for this instance it literly always going to be for that JSON request and always displaying the 3 results only... so the last function works like a charmer...
Ill toss this one here before making a thread on what could be a very simple answer... not to mention you seem sharp and id love your opinion on it in particular. I only have space for about 77 characters of the status.. then i would like to cut off the status and append it with ... or something indicating there is additional text that was cut off... i modified the code to do this... It appears to work but im curios if this would be your implentation as well...
var thediv = document.getElementById("results")
var base = o.query.results.json.streams;
for (var i = 0; i < base.length; i ++ )
document.getElementById("streamlogo" + (i + 1)).src = base[i].channel.logo;
document.getElementById("streamname" + (i + 1)).innerHTML = base[i].channel.name;
var status = base[i].channel.status
if (status.length > 77)
var statusubstr = status.substr(0,76)
document.getElementById("streaminfo" + (i + 1)).innerHTML = "<b>Viewers: " + base[i].viewers + "</b><br><p>" + statusubstr + "... </p>";
document.getElementById("streaminfo" + (i + 1)).innerHTML = "<b>Viewers: " + base[i].viewers + "</b><br><p>" + status + " </p>";
However, how do you accommodate for ['s and various other characters that don't take up that much space and some characters that do take up allot of space to best fit as much as you can into the area? or is this a concern?