Button to select files for uploading unavailable in IE

Last post 07-26-2012, 1:04 PM by dpellerin. 22 replies.
Page 1 of 2 (23 items)   1 2 Next >
Sort Posts: Previous Next
  •  03-02-2012, 5:33 AM 73283

    Button to select files for uploading unavailable in IE

    The button to select files for uploading is not always working Internet Eplorer. It looks enabled, but clicking on it does nothing. It does not bring up the file selection dialog.
    Other browsers don't have this issue. It is IE only.
     
    I'm using Internet Explorer 9 under Windows Vista.
     
    I see the same problem on your demo page at eg. http://ajaxuploader.com/Demo/select-multiple-files-upload.aspx 
     
    What can we do to solve this?

    Regards, Marja
  •  03-02-2012, 7:52 AM 73287 in reply to 73283

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    What version silverlight/flash plug-in you are using with your ie browser?
     
    Some time load the plug-in will take a few seconds. You just need to wait for the plug-in load complete.
     
    Regards,
     
    Ken 
  •  03-02-2012, 8:04 AM 73290 in reply to 73287

    Re: Button to select files for uploading unavailable in IE

    Silverlight version 5.0.61118.0
    Shockwave Flash version 11.1.102.62
     
    Waiting a few seconds does not help. The button just won't work at all, no matter how long I wait.

    Regards, Marja
  •  03-06-2012, 7:44 AM 73348 in reply to 73290

    Re: Button to select files for uploading unavailable in IE

    Kenneth, any news/insights about this issue ?
    It's getting more and more urgent because my customers are increasingly complaining about it.

    Regards, Marja
  •  03-07-2012, 7:38 AM 73368 in reply to 73348

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    This issue should cause by your silverlight 5.
     
    Please download the latest version here http://ajaxuploader.com/download/Ajax-Uploader.zip and try again. It should work for you.
     
    Regards,
     
    Ken 
  •  03-07-2012, 8:46 AM 73369 in reply to 73368

    Re: Button to select files for uploading unavailable in IE

    I tried the new DLL but it still doesn't work in Internet Explorer.
    The button to bring up the file selection dialog is black (enabled), then gray (disabled) and then black (enabled) again. But clicking on it does absolutely nothing.
     
    I have the latest version of the Silverlight plugin. So what else should I do to get this working?

    Regards, Marja
  •  03-08-2012, 7:12 AM 73378 in reply to 73369

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    Please try on demo http://www.ajaxuploader.com/Demo/select-multiple-files-upload.aspx with your ie browser. Does it work for you?
     
    What I mean is the problem causes by your silverlight 5. I suggest you use silverlight 4. If you must use silverlight 5, please refer to the info below
     
    -------------------------------------------------- 
    It is the microsoft silverlight plug-in bug, silverlight 5 must use with Silverlight 5 Tools for Visual Studio .you can download the tools at http://www.silverlight.net/getting-started, it will fix the problem.
    Silverlight will not automatic updates to 5.0,If your client manually update to 5.0, then please let him instal the Silverlight 5 Tools too.
    --------------------------------------------------  
     
    Regards,
     
    Ken 
  •  03-08-2012, 7:31 AM 73379 in reply to 73378

    Re: Button to select files for uploading unavailable in IE

    The demo at http://www.ajaxuploader.com/Demo/select-multiple-files-upload.aspx doesn't work for me, regretfully.
    I will try downgrading Silverlight to version 4 and see if that changes anything.

    Regards, Marja
  •  03-08-2012, 7:56 AM 73380 in reply to 73379

    Re: Button to select files for uploading unavailable in IE

    I can' t find how to downgrade Silverlight to a lower version. It seems only version 5 (the one I already had) is available for download.
     
    So I tried setting UploadType="Flash" explicitly on the CuteWebUI:Uploader, to bypass Silverlight alltogether, but then I run into an error in the Ajax Uploader component:
    "Line: 1  Error: Unable to get value of the property 'length': object is null or undefined" 
     
    I get this same error in IE (without the Silverlight plugin being installed) on your demo page at http://ajaxuploader.com/Demo/select-multiple-files-upload.aspx 
    The upload itself succeeds, but the error is annoying. 

    Regards, Marja
  •  03-08-2012, 8:21 AM 73381 in reply to 73378

    Re: Button to select files for uploading unavailable in IE

    Kenneth:
    -------------------------------------------------- 
    It is the microsoft silverlight plug-in bug, silverlight 5 must use with Silverlight 5 Tools for Visual Studio .you can download the tools at http://www.silverlight.net/getting-started, it will fix the problem.
    Silverlight will not automatic updates to 5.0,If your client manually update to 5.0, then please let him instal the Silverlight 5 Tools too.
    --------------------------------------------------  
     
    I can't ask my clients to install the Silverlight 5 tools. My clients are organisations and I don't know all the individual users.
    Asking them all to downgrade their Silverlight plugin (if at all possible) is simply not an option, nor is asking them all the install any additional tools.
     
    It should work out-of-the-box. 

    Regards, Marja
  •  03-08-2012, 1:01 PM 73385 in reply to 73381

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    The silverlight plug-in will not update to version 5 automatically.
     
    You can disable the silverlight upload mode by the code above, then it will not be the problem any more. 
     
       protected override void OnLoad(EventArgs e)
        {
            uploader1.SetAdvancedOption(UploaderAdvancedOption.NoSilverlight, "true");
            base.OnLoad(e);
        }
     
    Regards,
     
    Ken 
  •  03-09-2012, 2:03 AM 73387 in reply to 73385

    Re: Button to select files for uploading unavailable in IE

    Like I wrote before, bypassing the Silverlight plugin (and thus using Flash instead) results in a JavaScript error in Internet Explorer:
    "Microsoft JScript runtime error: Unable to get value of the property 'length': object is null or undefined".

    Regards, Marja
  •  03-09-2012, 7:35 AM 73393 in reply to 73387

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    Please try here http://ajaxuploader.com/demo/fulltest.aspx, does  one of them work for you?
     
    Regards,
     
    Ken 
  •  03-09-2012, 7:45 AM 73394 in reply to 73393

    Re: Button to select files for uploading unavailable in IE

    Test results in IE9 (with latest Silverlight plugin installed):

    1. Auto: does NOT work
    2. IFrame: works fine
    3. Flash: file gets uploaded, but I get a JavaScript error (afterwards?)
    4. Silverlight: does NOT work
     
     

    Regards, Marja
  •  03-09-2012, 7:55 AM 73395 in reply to 73394

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    Do you mind disable your Anti-virus software and firewall to try again? By the way, reset the security settings of IE browser too.
     
    It works very well for me
     
    Regards,
     
    Ken 
  •  03-09-2012, 8:17 AM 73396 in reply to 73395

    Re: Button to select files for uploading unavailable in IE

    Sorry Ken, but I can't get it to work. Tried all your suggestions, but it doesn't make any difference. :-(

    Regards, Marja
  •  03-13-2012, 1:29 PM 73427 in reply to 73396

    Re: Button to select files for uploading unavailable in IE

    MarjaR,
     
    We cannot reproduce this issue in our end.
     
    Can you send a screenshot to [email protected]?
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  06-07-2012, 7:28 AM 73847 in reply to 73396

    Re: Button to select files for uploading unavailable in IE

    Hi MarjaR,
     
    We have fixed the silverlight 5 issue, please download the latest version and try again.
     
    Latest version download url: http://www.cutesoft.net/downloads/folders/44395/download.aspx
     
    Regards,
     
    Ken 
  •  06-11-2012, 8:36 AM 73868 in reply to 73847

    Re: Button to select files for uploading unavailable in IE

    Hi Ken,
     
    Yes, that works okay now in IE. Thanks!
     

    Regards, Marja
  •  07-19-2012, 8:02 AM 74175 in reply to 73868

    Re: Button to select files for uploading unavailable in IE

    Hi.
    I'm also experiencing this same issue with IE when I've deployed the web application to the web server. The weird think is that it's running ok in my development machine, and it also works fine in both machines, the development one and the server, with Opera, Firefox and Safari, but accessing using IE to the application deployed in the web server, the button simply doesn't fire the files selection dialog.
     
    I've downloaded the version from http://www.cutesoft.net/downloads/folders/44395/download.aspx so it seems that here isn't the solution. I've written an example that you can run in my web server with this url: http://peritaciones.tandemcr.com/pruajaxuploader/default.aspx. And below you can find the code.
     
    Thank you in advance
    Juan Miguel
     
    First the aspx file:

    <%@ Page Title="Página principal" Language="C#" AutoEventWireup="true"
        CodeBehind="Default.aspx.cs" Inherits="PruebaAjaxUploader._Default" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head id="Head1" runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
    </head>
    <body>
        <form id="Form1" runat="server">
            <asp:Button ID="btnPostBack" runat="server" Text="Post back" /> 
            <asp:Label ID="label1" runat="server"></asp:Label>
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:UpdateProgress ID="upgrPeritacion" AssociatedUpdatePanelID="updtPeritacion" runat="server">
                <ProgressTemplate>
                    <div class="upgProgreso">
                        <div class="textoProgreso"><span id="upgrPeritacionText">Loading...</span></div>
                        <div class="imagenProgreso"><img alt="Espere un momento, por favor" src="img/cargando.gif" /></div>
                    </div>     
                </ProgressTemplate>
            </asp:UpdateProgress>
            <asp:UpdatePanel ID="updtPeritacion" runat="server">
                <ContentTemplate>
                    <h2>
                        Testing Ajax Uploader
                    </h2>

                    <fieldset>
                        <legend>Documentation</legend>
                            <CuteWebUI:UploadAttachments ID="uaDocumentos"
                                runat="server"
                                OnUploadCompleted="uaDocumentos_UploadCompleted">
                            </CuteWebUI:UploadAttachments>
                            <fieldset>
                                <legend>Photographs</legend>
                                <asp:Repeater ID="rptFotos" runat="server" onitemcommand="rptFotos_ItemCommand"
                                    onitemdatabound="rptFotos_ItemDataBound">
                                    <ItemTemplate>
                                        <div style="float:left; padding-left:5px; padding-right:5px;">
                                            <div>
                                                <asp:LinkButton ID="lnkBorrar" CssClass="BorrarFoto" runat="server" CommandName="Borrar" >X Delete</asp:LinkButton>
                                            </div>
                                            <div>
                                                <a href="<%# DataBinder.Eval(Container.DataItem, "url") %>" target="_blank">
                                                    <img src="<%# DataBinder.Eval(Container.DataItem, "url") %>" alt="<%# DataBinder.Eval(Container.DataItem, "nombreFichero") %>" style="height:100px;"/>
                                                </a>
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </fieldset>
                            <fieldset>
                                <legend>Other Documents</legend>
                                <asp:Repeater ID="rptOtrosDoc" runat="server" onitemcommand="rptFotos_ItemCommand"
                                    onitemdatabound="rptOtrosDoc_ItemDataBound">
                                    <ItemTemplate>
                                        <div style="float:left; padding-left:5px; padding-right:5px;">
                                            <div>
                                                <asp:LinkButton ID="lnkBorrar" CssClass="BorrarFoto" runat="server" CommandName="Borrar">X Delete</asp:LinkButton>
                                            </div>
                                            <div>
                                                <a href="<%# DataBinder.Eval(Container.DataItem, "url") %>" target="_blank">
                                                    <asp:Image ID="imgTipoDoc" runat="server" />
                                                    <br /><%# DataBinder.Eval(Container.DataItem, "nombreFichero") %>
                                                </a>
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </fieldset>
                    </fieldset>
                    <fieldset>
                        <legend>Report</legend>
                        <div id="divSelecPdfInforme" runat="server" class = "etiquetaGrupo">
                            <CuteWebUI:UploadAttachments ID="uaPdfInforme"
                                runat="server"
                                MultipleFilesUpload="False"
                                MaxFilesLimit="1"
                                DialogFilter="*.pdf"
                                ValidateOption-AllowedFileExtensions="pdf"
                                ShowCheckBoxes="False"
                                ShowRemoveButtons="False"
                                OnUploadCompleted="uaPdfInforme_UploadCompleted" >
                            </CuteWebUI:UploadAttachments>
                        </div>
                        <div id="divPdfInforme" runat="server" class="valorGrupo">
                            <asp:Label ID="Label2" runat="server" Text="Pdf Report:"></asp:Label>
                            <asp:HyperLink ID="hlkPdfInforme" Target="_blank" runat="server">View Report</asp:HyperLink>
                            &nbsp;
                            <asp:Button ID="btnBorrarPdfInforme" runat="server" CssClass="boton" onclick="btnBorrarPdfInforme_Click" Text="Delete Report"></asp:Button>
                        </div>
                    </fieldset>
                </ContentTemplate>
                <Triggers>
                </Triggers>
            </asp:UpdatePanel>
        </form>
    </body>
    </html>

     And then the cs code:

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;

    using System.Data;
    using System.IO;
    using CuteWebUI;

    namespace PruebaAjaxUploader
    {
        public partial class _Default : System.Web.UI.Page
        {
            #region Propiedades
            #region PathCarpetaServicio
            private String PathCarpetaServicio
            {
                get { return "test"; }
            }
            #endregion

            #region PathPdfInforme
            public string PathPdfInforme
            {
                get { return this.PathCarpetaServicio + "/Report.pdf"; }
            }
            #endregion
            #endregion

            #region Rutinas controladoras de eventos
            #region Page_Load
            protected void Page_Load(object sender, EventArgs e)
            {
                if (!IsPostBack)
                {
                    label1.Text = "first load!";
                    hlkPdfInforme.NavigateUrl = this.PathPdfInforme;
                    if (!Directory.Exists(Server.MapPath(this.PathCarpetaServicio)))
                        Directory.CreateDirectory(Server.MapPath(this.PathCarpetaServicio));
                    else
                    {
                        CargarDocumentacion();
                        if (File.Exists(Server.MapPath(this.PathPdfInforme)))
                        {
                            divPdfInforme.Style["display"] = "inline";
                            divSelecPdfInforme.Style["display"] = "none";
                        }
                        else
                        {
                            divPdfInforme.Style["display"] = "none";
                            divSelecPdfInforme.Style["display"] = "inline";
                        }
                    }
                }
                else
                    label1.Text = "post back!"; 
            }
            #endregion

            #region rptFotos_ItemDataBound
            protected void rptFotos_ItemDataBound(object sender, RepeaterItemEventArgs e)
            {
                DataRowView dr = e.Item.DataItem as DataRowView;
                //Image img = e.Item.FindControl("imgFoto") as Image;
                //img.ImageUrl = dr["url"].ToString();
                LinkButton lnkb = e.Item.FindControl("lnkBorrar") as LinkButton;
                lnkb.CommandArgument = dr["nombreFichero"].ToString();
            }
            #endregion

            #region rptOtrosDoc_ItemDataBound
            protected void rptOtrosDoc_ItemDataBound(object sender, RepeaterItemEventArgs e)
            {
                DataRowView dr = e.Item.DataItem as DataRowView;
                //Label lblNombreFichero = e.Item.FindControl("lblNombreFichero") as Label;
                //lblNombreFichero.Text = dr["nombreFichero"].ToString();
                Image imgTipoDoc = e.Item.FindControl("imgTipoDoc") as Image;
                String srvPathImagen = Path.Combine(Server.MapPath("img"), String.Format("{0}.png", dr["extension"]));
                if (File.Exists(srvPathImagen))
                    imgTipoDoc.ImageUrl = String.Format("img/{0}.png", dr["extension"]);
                else
                    imgTipoDoc.ImageUrl = "img/archivo.png";
                LinkButton lnkb = e.Item.FindControl("lnkBorrar") as LinkButton;
                lnkb.CommandArgument = dr["nombreFichero"].ToString();
            }
            #endregion

            #region rptFotos_ItemCommand
            protected void rptFotos_ItemCommand(object source, RepeaterCommandEventArgs e)
            {
                String NombreFichero = Path.Combine(Server.MapPath(this.PathCarpetaServicio), e.CommandArgument.ToString());
                if (File.Exists(NombreFichero))
                {
                    File.Delete(NombreFichero);
                    CargarDocumentacion();
                }
            }
            #endregion

            #region uaDocumentos_UploadCompleted
            protected void uaDocumentos_UploadCompleted(object sender, UploaderEventArgs[] args)
            {
                foreach (AttachmentItem item in uaDocumentos.Items)
                {
                    String srvNombreFichero = item.FileName;
                    item.CopyTo(Path.Combine(Server.MapPath(this.PathCarpetaServicio), srvNombreFichero));
                }

                uaDocumentos.DeleteAllAttachments();
                CargarDocumentacion();
            }
            #endregion

            #region uaPdfInforme_UploadCompleted
            protected void uaPdfInforme_UploadCompleted(object sender, CuteWebUI.UploaderEventArgs[] args)
            {
                if (uaPdfInforme.Items.Count > 0)
                {
                    uaPdfInforme.Items[0].CopyTo(Server.MapPath(this.PathPdfInforme));
                    divSelecPdfInforme.Style["display"] = "none";
                    divPdfInforme.Style["display"] = "inline";
                }
                uaPdfInforme.DeleteAllAttachments();
            }
            #endregion

            #region btnBorrarPdfInforme_Click
            protected void btnBorrarPdfInforme_Click(object sender, EventArgs e)
            {
                if (File.Exists(Server.MapPath(this.PathPdfInforme)))
                    File.Delete(Server.MapPath(this.PathPdfInforme));

                divSelecPdfInforme.Style["display"] = "inline";
                divPdfInforme.Style["display"] = "none";

            }
            #endregion
            #endregion

            #region Rutinas internas
            #region CargarDocumentacion
            private void CargarDocumentacion()
            {
                DataTable dtFotos = new DataTable();
                dtFotos.Columns.AddRange(new DataColumn[] { new DataColumn("url", typeof(String)), new DataColumn("nombreFichero", typeof(String)) });
                DataTable dtDocumentos = new DataTable();
                dtDocumentos.Columns.AddRange(new DataColumn[] { new DataColumn("url", typeof(String)), new DataColumn("nombreFichero", typeof(String)), new DataColumn("extension", typeof(String)) });

                String[] srvFicheros = Directory.GetFiles(Server.MapPath(this.PathCarpetaServicio));
                foreach (String f in srvFicheros)
                {
                    string srvExtension = Path.GetExtension(f).ToLower().Substring(1);
                    if (srvExtension == "jpg" || srvExtension == "gif" || srvExtension == "bmp" || srvExtension == "png")
                        dtFotos.Rows.Add(new Object[] { String.Format("{0}/{1}", this.PathCarpetaServicio, Path.GetFileName(f)), Path.GetFileName(f) });
                    else
                    {
                        dtDocumentos.Rows.Add(new Object[] { String.Format("{0}/{1}", this.PathCarpetaServicio, Path.GetFileName(f)), Path.GetFileName(f), srvExtension });
                    }
                }

                rptFotos.DataSource = dtFotos;
                rptFotos.DataBind();
               
                rptOtrosDoc.DataSource = dtDocumentos;
                rptOtrosDoc.DataBind();
            }
            #endregion
            #endregion
        }
    }

Page 1 of 2 (23 items)   1 2 Next >
View as RSS news feed in XML