I have this code:

```
function getImage(imgPath,override){
    image=new Image();
    image.src=imgPath;
    document.getElementById('imgboxDavanti').appendChild(image);
}

```

and the HTML that calls this function is:

```
<a href='#' onclick="getImage('immagini/giaccasaccobacino/1petto/beige.png','true')">

```

this is the div where i would put the image

```
<div id="imgbox">
    <div id="imgboxDavanti">IMAGE HERE</div>
    <div id="imgboxDietro"></div>
</div>

```

but I don't display the image (and if I pass a wrong path as an argument, I see the typical "image not found" icon). What's the problem?