Re: Problem style="display:none"

  •  03-05-2009, 6:39 AM

    Re: Problem style="display:none"

    In Safari and Chrome, I try the new version, when I execute it the first time it works well...
    Now when I want to go up another file the button browse files it is disabled!!!
    please I need solution.

    I send them the example code,
     
    ------------------------------

    html>

    <head runat="server">

      <title></title>

      <script>

        function FileUpload(){

          document.getElementById('DivFileUploadTest').style.display = '';

        }

     

        function CerrarFileUpload(){

          document.getElementById('DivFileUploadTest').style.display = 'none';

        }

       

            function submitbutton_click()

            {

                  var submitbutton=document.getElementById('<%=SubmitButton.ClientID %>');

                  var uploadobj=document.getElementById('<%= UploadAttachments1.ClientID %>');

                  if(!window.filesuploaded)

                  {

                        if(uploadobj.getqueuecount()>0)

                        {

                              uploadobj.startupload();

                        }

                        else

                        {

                              var uploadedcount=parseInt(submitbutton.getAttribute("itemcount"))||0;

                              if(uploadedcount>0)

                              {

                                   return true;

                              }

                              alert("Select a file!.");

                        }

                        return false;

                  }

                  window.filesuploaded=false;

                  return true;

            }

       

      </script>

     

    </head>

    <body>

      <form id="form1" runat="server">

        <asp:ScriptManager ID="ScriptManager1" runat="server" />

        <asp:UpdatePanel ID="UpdatePanel1" runat="server">

          <ContentTemplate>

            <input id="Upload" type="button" onclick="BLOCKED SCRIPTFileUpload();return false;"

              name="Upload" value="Open Window" />

            <div id="DivFileUploadTest" style="display: none;" runat="server">

              <CuteWebUI:UploadAttachments runat="server" ID="UploadAttachments1" InsertText="Select a file"

                CancelText="Cancel" MultipleFilesUpload="true" ShowRemoveButtons="false" ShowCheckBoxes="false"

                CancelAllMsg="Cancel all" ProgressPanelWidth="200" ShowTableHeader="False" ProgressInfoStyle="padding-left:3px;font:normal 10px Tahoma;"

                ShowFileIcons="False" ItemTextTemplate="" ManualStartUpload="true">

                <ValidateOption MaxSizeKB="2097150" />

              </CuteWebUI:UploadAttachments>

              <asp:Button runat="server" ID="SubmitButton" OnClientClick="return submitbutton_click()"

                Text="Upload" />

            </div>

          </ContentTemplate>

        </asp:UpdatePanel>

      </form>

    </body>

    </html>

     

    ------------------------
     
    Regards,
     
    Juan
View Complete Thread