View Single Post
  #1 (permalink)  
Old August 27th, 2007, 02:02 PM
ragu_nit ragu_nit is offline
Registered User
 
Join Date: Aug 2007
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default input type file design in firefox

can you please tell me why this code is not working in firefox browser

<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>
    <style>
    .button { color:#000000;font-family:Verdana;font-size:11px;width:115px;height: 21px;border: 1px #285843 solid; cursor:hand;
text-align: center;vertical-align: center;font-weight:bold; background:#999999;
}
    </style>
</head>
<body>
  <form name="frmUpload">

    <input type="file" name="myFile" style="display: none">

    <input type="text" name="txtFakeText" readonly="true">

    <input type="button" onClick="HandleFileButtonClick();" value="Browse" class="button">
  </form>
</body>
</html>
Reply With Quote