
11-06-2007, 06:52 AM
|
| D-Web Programmer | | Join Date: Mar 2007 Location: Chennai
Posts: 67
| |
Preview Image before Uploading File to Server Hello all,
I want to preview the image before it get upload to server.
for this, i had done the following stuff... This works fine in IE browser, and not in Firefox
Please help me out to solve this problem.... Code: <script language="javascript">
function PreviewImage( FileObj )
{
var vFilePath = FileObj.value;
var oImage = document.getElementById("ImgPreview");
oImage.src = vFilePath;
}
</script> HTML Code: <form action="" id="frmUpload" name="frmUpload"> <input type="file" name="fileUpload" id="fileUpload" onChange="PreviewImage(this)"> <img id="ImgPreview"> <input type="submit" name="btnSubmit" value="Submit"> </form>
__________________ Regards, VELHARI I am not totally useless. I can be used for a bad example |