javascript - My code is not loading images -
i'm having issue code acknowledges correct objects pull in. however, when test file images not being pulled in @ all. i've double checked , i'm getting 404 response, files exist in correct directory.
//json object sample below, separate file.... var reviews = [{ id: "ajjhwejkssl", title: "the little camera could!", rating: 5, body: "text here", createdate: new date(2012, 5, 23, 14, 12, 10, 0), owner: { id: "kwergiueerwq", name: "bugs bunny", url: "./users.html?id=kwergiueerwq", avatarimage: "./avatars/bugsbunny.jpg", isfeaturedreviewer: false, createdate: new date(2012, 2, 12, 9, 44, 0, 0) } } ] //code var data = reviews; $(document).ready(function () { //console.log("browser: " + browser); (var = 0; < data.length; i++) { try { //create new review div var reviewpost = "<div class='review'><div class='clear'></div><div class='content'><div class='dateposted'>" + data[i].createdate + "</div><div class='avatar'><div class='header'><div class='rating'><img src='images/star-sprite.png'/><img src='images/star-sprite.png'/><img src='images/star-sprite.png'/><img src='images/star-sprite.png'/><img src='images/star-sprite.png'/></div></div><div class='clear'></div><div class='title'>" + data[i].title + "</div><div class='memberimg'><img id='thumb' src=" + data[i].owner.avatarimage + "/></div><div id='member'><div class='reviewedby'>reviewed <a href='' class='member'>" + data[i].owner.name + "</a></div><div class='membership'>member since " + data[i].owner.createdate + "</div></div></div></div><div class='clear'></div><div class='message'>" + data[i].body + "</div></div><div class='clear'></div>"; if (data[i].rating != null) { console.log("rating: " + data[i].rating); } //adds reviewpost inside of reviews review.append(reviewpost); //document.write(reviewpost); } catch (e) { console.log("error: " + e); }; } });
any ideas , suggestions great.
the dot in paths doesn't matter, i've learned, but:
also, make sure avatars directory in fact in root of web directory.