Re: How to put .gif image using java script
[quote="neha_kulkarni777":3q31hzeg]but it is showing a square box by default and when the upload button is clicked the .gif image is displayed , I dont need that square box .
i got the solution , but is there any way to remove the square box . Thanks
[/quote:3q31hzeg]
You can try adding border="0" to the img tag.
[code:3q31hzeg]
<img id="img" src="" border="0">
[/code:3q31hzeg]
You can also try a masked image instead of using src="". Another option *may* be to use the div tag and innerHTML, but I don't know how how well it's supported by different browsers.
[code:3q31hzeg]
function validateField() {
var docs = document.getElementById("container");
docs.innerHTML = "<img src="gif_path">;
... // other code
}
...
<body>
<div id="container"></div>
...
[/code:3q31hzeg]
Hope that helps.