Click to See Complete Forum and Search --> : create an image from javascript


zulu99
01-08-2003, 06:26 AM
Hi

Could you tell me if this possible. i have a jpeg file i dont want to use <img src > tag for including that page .
can i write a code in javascript which draws the image file at a particular position.

I have a specific requirment to do this.

Kindly reply

thanks
Sushant

khalidali63
01-08-2003, 07:16 AM
If I understand your question correctly,
you want something like this.


<html>
<head>
<title>Untitled</title>
<script language="JavaScript1.2">
window.onload=loadImage;
function loadImage(){
var imgId = document.getElementById("putImg");
imgId.innerHTML = '<img src="images/flake.gif" name="flake" width="20" height="20" border="1" onclick="gettheheight();" vspace="0">';
}
</script>
</head>

<body>
<div id="putImg"></div>
</body>
</html>