[SOLVED] Safari Blocks Animations on Postback, But FileUpload Cannot Use ASyncPostBackTigger in UpdatePanel


I’m in a bit of a conundrum here.

I have a FileUpload inside an UpdatePanel. As FileUpload cannot use an ASnycPostBackTrigger it must make use of a PostBackTrigger kind of defeating the purpose of AJAX (this is a security implementation I assume). Currently when my file upload begins, I show the user a loading gif and when the page posts back it hides the animation.

This works great for all browsers except Safari. Safari freezes all animations during full postback/redirects to save resources (meaning my gif will display but not animate). I am stuck as I am unsure how to render the loading animation as FileUpload cannot use partial postback behavior.

Anyone have any ideas on how to render animations during file transfer in Safari?


<asp:UpdatePanel runat="server" ID="updatePanel">
        <div class="wrapper">
            <asp:Panel runat="server" ID="masterPanel">                  
                <asp:FileUpload ID="fileUpload1" runat="server" AllowMultiple="true" /> 
                <asp:Button ID="btnUpload" Text="Submit" runat="server" UseSubmitBehavior="false" 
    OnClientClick="return submitFiles()" />               
        <asp:PostBackTrigger ControlID="btnUpload"  />


<asp:UpdateProgress ID="loadingProgess" AssociatedUpdatePanelID="updatePanel" runat="server">
           <asp:Panel runat="server" id="loading" >
                 <asp:Image src="loader.gif" runat="server" ID="loadingImage" />


<script type="text/javascript">    
        function UploadFile(fileUpload) {
            if (fileUpload.value != '') {
                //Display animation
                document.getElementById('<% Response.Write(loadingProgess.ClientID); %>').style.display = "inline"; 
                //Posts files    


Have you tried a CSS animation instead of GIF?
Check this.

Answered By – dobre.b

Answer Checked By – David Goodson (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *