Say I create an image object like below. ( create(); is a function I wrote but I know this function works.)
var img = create("img", "images/duba.jpg");
When I try to put this image into the innerHTML of another object that's a div, I get this plain text where the image should show up:
[object HTMLImageElement]
What's the correct method to insert one object into another like this? I have to think there's a more graceful method than hard-coding the innerHTML with strings, which I've tried successfully.