I have an asp.net page
<input id="MyTextBox" runat="server" type="text" name="T1" size="20"/> <asp:Button ID="UploadFileButton" runat="server" Text="Upload" /> <input id="FileUpload" runat="server" type="file" style="height: 22px; visibility:hidden;" />
linked to JS script:
$("#UploadFileButton").live("click", function(event) { event.preventDefault(); $("#FileUpload").click(); }); $(function() { $('#FileUpload').change(function() { $("#MyTextBox").val($(this).val()); }); });
This means that when the user clicks UploadFileButton , a pop-up window for selecting the selected file is displayed.
After the user has selected the file, the file path is MyTextBox = Selct.
My problem is that my script works in Chrome, but not in Firefox.
Any ideas please if someone has already run into this problem.
user594166
source share