In my ASP.NET code I use that script :
<script type="text/javascript">
function fireFileClick() {
debugger;
var objfile = Object;
objfile = document.getElementById("<%= UpLoadButton.ClientID %>");
objfile.click();
}
</script>
The script is working just fine on Internet Explorer, but when I'm tying to use any other explorer is not working.
That means the "selected File" not passed to the `FileUpload` control.
Under the Chrome browser (with F12) I open the `debugger` and what I see there surprises me allot.
Which means; when the `debugger` is `on` then the file uploads on the control and the all processes goes fine.
But when the `debugger` is off then the selected file it is not uploaded to the control.
Is someone to solve that mystery?
I forgot to mention that I have two controls in ASP.NET
<asp:Button ID="UpLoadFile" runat="server" Value="Add" Text="Επιλογή αρχείου" onclientclick="fireFileClick()" onclick="ControlHasFile" CssClass="FileSelection" />
<asp:FileUpload ID="UpLoadButton" runat="server" />
control.
What I have tried:
Nothing more that what I mention before.