Looking at the way you wrote your script i'm wondering if that is possible best practice to implement it onto my page...
I have a div with alot of formatting and other html and i had filler images, and ipsum text for the design process. Now i want to replace with the images and text im extracting from this JSON query....
If i use something likethis for instance
Code:
document.getElementById("streamlogo1").src=base[0].channel.logo;
Then there is a moment where the images are defualt and then change to the proper image....
Would the best practice way of implementing the JSON links and images be to use the document.write in the same mannor you did and just include the formatting HTML into the document.write allowing JS to essentially write that portion of the site including all HTML aspects
or is there another way that's considered best practice?
* correction: you utilized the thediv.innerHTML which since this code all exists inside a div would be applicable.. would this be best practice? cause i would have to include more embeded <div> into the html the thediv.innerHTML was genertaing to maintain formatiing