My goal is to dynamically place an image exactly where a user clicks on the webpage. Currently, I have the following code, but it only adds the image at the top and continues to do so repeatedly...not appearing at the clicked location.
<html>
<head>
<script type="text/javascript">
function stamp(d,e)
{
var i = new Image();
i.src = 'smiley.jpg';
document.getElementById('target').appendChild(i);
//document.getElementById('target').style.left = "100px"; //e.clientX ;
//document.getElementById('target').style.right = "1000px"; //e.clientY;
}
</script>
</head>
<body id="target" onclick="javascript:stamp(this,event);" style="left: 100px">
</body>
</html>