Stack Overflow is a community of 4.7 million programmers, just like you, helping each other.

Join them; it only takes a minute:

Sign up
Join the Stack Overflow community to:
  1. Ask programming questions
  2. Answer and help your peers
  3. Get recognized for your expertise

I want to view all the items in my database and i managed to retrieve all except for the image.

This is my code:

 htmlString += '<div class="col-md-4"> ImageShouldGoHere </div>';
 htmlString += '<div class="col-md-8">';
 htmlString += '<div class="col-md-12 listing-title"> ' + data[i].title + ' </div>';
 htmlString += '<div class="col-md-12 category-text"> ' + data[i].category + ' </div>';

The URL of the image is located in data[i].previewImage how can i view the URL as an image in the place of ImageShouldGoHere?

share|improve this question
    
htmlString += '<div class="col-md-4"><img src="' + data[i].previewImage + '" /></div>'; – Hanlet Escaño 8 mins ago

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.