Post by Prezence on Mar 19, 2016 23:17:01 GMT 10
function displaymovies(arr) { var imgpath = ""; var i; //don't need this for(i = 0; i < arr.length; i++) { imgpath += arr.poster; //+= appends the string, = sets the variable. Use =. Also, you must get the poster of the current index of the array: arr[i].poster not arr.poster. }
var movitem = document.createElement("div"); //this whole block should be inside the loop. Also, unless you specify a height and width for a div, if you don't have any innerHTML set, it will display as 0x0. movitem.className = "dpad-focusable"; movitem.id = "recbox"; movitem.tabIndex = "0"; movitem.style.backgroundImage = "url(" + imgpath + ")"; var innermov = document.getElementByid("innermov"); //the function is getElementById not getElementByid. Make sure you capitalize that first I innermov.appendChild(movitem); }
Think that covered everything ranilwallace
Check out our website here. Check out AirBrowse here. Follow us on GitHub here.
Last Edit: Mar 19, 2016 23:19:00 GMT 10 by Prezence
|
|
Post by ranilwallace on Mar 19, 2016 23:18:46 GMT 10
Yup Thanks for the help guys.
Ranil, Lauve Tech
|
|