The Telerik help files show the following code for previewing an image prior to upload:
unfortunately this does not work with Firefox. The get_fileInputField().value stips out all path info in Firefox leaving just the filename.
Is there a workaround for this?
Thanks,
Mark
<script type="text/javascript"> |
function OnClientFileSelectedHandler(sender, eventArgs) |
{ |
var input = eventArgs.get_fileInputField(); |
//check the extension |
if (sender.isExtensionValid(input.value)) |
{ |
var img = document.getElementById('<%= Image1.ClientID %>'); |
if (img) |
{ |
img.style.visibility = ""; |
img.src = eventArgs.get_fileInputField().value; |
} |
} |
} |
</script> |
unfortunately this does not work with Firefox. The get_fileInputField().value stips out all path info in Firefox leaving just the filename.
Is there a workaround for this?
Thanks,
Mark