File Browse without button

File Browse without button
<html>
<head>
<title>File Upload Example</title>
<script language=”JavaScript” type=”text/javascript”>
function HandleFileButtonClick()
{
document.frmUpload.myFile.click();
document.frmUpload.txtFakeText.value = document.frmUpload.myFile.value;
}
</script>
</head>
<body>
<form name=”frmUpload”>
<input type=”file” name=”myFile” style=”display: none”>
<input type=”text” name=”txtFakeText” readonly=”true”>
<a href=”javascript:HandleFileButtonClick();”>Attach</a>
</form>
</body>
</html>

Advertisements