Welcome Guest Search | Active Topics | Sign In | Register

AJAXUploader browse button always appears disabled Options
Duane
Posted: Friday, October 2, 2009 11:26:05 AM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
The browsebutton on the AJAXUploader always appears disabled except while the file is being uploaded. It is clickable, not like an actual button, but like a link, and the Choose file to upload opens, but the button always looks grayed except when the file is actually uploading.

I am not setting the BrowseButtonStyle property on the Uploader, but doing so, did not seem to make any difference.

The uploader is inside a Dialog:


Code: HTML/ASPX
<eo:AJAXUploader 
  ID="AJAXUploader1" 
  runat="server" 
  Width="450px"
  TempFileLocation="~/eo_upload"
  AllowedExtension=".flv|.mov|.avi|.wmv|.mpeg|.mp4|.mpeg4"
  AutoUpload="true"
  MaxFileCount="1"
  ClientSideOnError="invalidFileExtension">
  <LayoutTemplate>
      <table border="0" width="450">
          <tr>
              <td colspan="2" style="width: 450px;"><asp:PlaceHolder runat="server" id="InputPlaceHolder"></asp:PlaceHolder></td>
          </tr>
          <tr>
              <td colspan="2">
                   <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_Vista" />
                   <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server"></asp:PlaceHolder>
                </td>
             </tr>
             <tr>
                 <td>
                     <eo:AJAXPostedFileList ID="PostedFileList" runat="server" />
                     <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server"></asp:PlaceHolder>                                            
                  </td>
                  <td>
                      <asp:Button ID="DeleteButton" runat="server" Text="Delete" CssClass="UploaderButtons" />
                  </td>
               </tr>
            </table>
         </LayoutTemplate>
</eo:AJAXUploader>


eo_support
Posted: Monday, October 5, 2009 11:13:03 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

It's normal that the button does not sink like a button when you click it (a known limitation). However it should still "look like" a button and not look like grayed out and disabled. We tested your code and we do not see the button grayed out. Can you provide a full test page so that we can see the problem?

Thanks
Duane
Posted: Monday, October 5, 2009 11:41:04 AM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
This test page shows the grayed out browse button. The uploader is inside of an EO Dialog. Is the dialog causing the grayed out appearance of the button? Removing the BrowseButtonStyle tags does not alter the grayed out appearance. The "non-sinking" effect is not a problem, but I need to resolve the grayed out issue.

Thanks.

Code: HTML/ASPX
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="UploaderTest.aspx.cs" Inherits="Lims_test_UploaderTest" %>

<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" language="javascript">
        function openDialog() {
            dialog = eo_GetObject("NewVideoMessage");
            dialog.show(true);
        }        
    </script>
    <style type="text/css">
    
    /* Dialog Box Style */
    .DialogHeader
    {
	    background-color: #FBD27E;
	    border-bottom-color: #FBD27E;
	    border-left-color: #FBD27E;
	    border-right-color: #FBD27E;
	    border-top-color: #FBD27E;
	    font-family: Arial, 'Times New Roman';
	    font-size: 11pt;
	    padding-bottom: 3px;
	    padding-left: 4px;
	    padding-right: 4px;
	    padding-top: 3px;
	    color: black;
	    letter-spacing: 0.1em;
    }
    .DialogFooter
    {
	    background-color: #D4D0C8; 
	    padding-bottom: 8px;
    }
    .DialogContent
    {
        font-family: Arial;
        font-size: 10pt;
	    border: #fdeac4 1px solid; 
	    background-color: #ffffff;
    }
    .failedValidationText
    {
        color:#ae1c21;
        font-weight: bold;
    }
    .passedValidationText
    {
        color: Black;
        font-weight: normal;
    }
    .UploaderButtons
    {
        font-family: Arial;
        font-size: 9pt;
        color: #000000;
    }
    .smallfont
    {
        font-size: 7pt;
        font-family: Arial;
    }

    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <a href="javascript:openDialog();" >Open Dialog</a>
        <eo:Dialog  ID="NewVideoMessage" 
                runat="server" 
                Width="500px" 
                Height="125px" 
                HeaderHtml="Upload Video" 
                AllowResize="True" 
                ControlSkinID="None" 
                ShadowColor="Gray" 
                ShadowDepth="3" 
                BackShadeColor="Gray" 
                BackShadeOpacity="55" 
                BorderColor="Black" 
                BorderStyle="Solid" 
                BorderWidth="1px">
        <HeaderStyleActive CssClass="DialogHeader" />
        <FooterStyleActive CssClass="DialogFooter" />
        <ContentStyleActive CssClass="DialogContent" />
        <ContentTemplate> 
            <br />
            <table align="center" cellpadding="5" cellspacing="0">
                <tr>
                    <td align="left" valign="top">
                        <span class="failedValidationText">*</span>Video Title:  
                    </td>
                    <td valign="top">
                        <asp:TextBox 
                            ID="ui_txt_Video_Title" 
                            runat="server" 
                            CausesValidation="true" 
                            Width="300" 
                            MaxLength="50" /><br />
                        <asp:RequiredFieldValidator 
                            ID="ui_rqdfldval_VideoTitle" 
                            runat="server" 
                            ControlToValidate="ui_txt_Video_Title" 
                            Display="Dynamic" 
                            ErrorMessage="Video Title is required" 
                            CssClass="failedValidationText" />                        
                    <td>
                    </td>
                </tr>
                <tr>
                    <td valign="top">
                        <span class="failedValidationText">*</span>Description:  
                    </td>                
                    <td valign="top">
                        <asp:TextBox 
                            ID="ui_txt_Video_Desc" 
                            runat="server" 
                            CausesValidation="true" 
                            Rows="3"
                            Columns="35" 
                            TextMode="MultiLine" 
                            MaxLength="250" /><br />
                        <asp:RequiredFieldValidator
                            ID="ui_rqdfldval_VideoDesc"
                            runat="server" 
                            ControlToValidate="ui_txt_Video_Desc"
                            Display="Dynamic"
                            ErrorMessage="Video Description if required"
                            CssClass="failedValidationText" />                            
                    </td>
                </tr>
                
                <tr>
                    <td align="left" valign="top" colspan="2">
                        <span class="failedValidationText">*</span>Video file  <span class="smallfont">(upload will start when file is selected)</span> 
                        <br />
                        <span class="smallfont">Formats Supported: .flv, .mov, .avi, .wmv, .asf, .mpeg, .mp4, mpeg4, .divx, .dv</span>
                    </td>
                </tr>
                <tr>
                    <td style="padding-left:15px;" align="left" valign="top" colspan="2">
                        <eo:AJAXUploader 
                            ID="AJAXUploader1" 
                            runat="server" 
                            Width="450px"
                            TempFileLocation="~/Images/Fundraiser/eo_upload"
                            AllowedExtension=".flv|.mov|.avi|.wmv|.asf|.mpeg|.mp4|.mpeg4|.divx|.dv" 
                            AutoUpload="true"
                            MaxFileCount="1"
                            ClientSideOnError="clientSideErrorHandler">
                            <BrowseButtonStyle CssClass="UploaderButtons" />
                            <DeleteButtonStyle CssClass="UploaderButtons" />
                            <LayoutTemplate>
                                <table border="0" width="450">
                                    <tr>
                                        <td colspan="2" style="width: 450px;">
                                            <asp:PlaceHolder runat="server" id="InputPlaceHolder">Input Box Place Holder</asp:PlaceHolder>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="2">
                                            <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_Vista" />
                                            <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server"></asp:PlaceHolder>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <eo:AJAXPostedFileList ID="PostedFileList" runat="server" />
                                            <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server"></asp:PlaceHolder>                                            
                                        </td>
                                        <td>
                                            <asp:Button ID="DeleteButton" runat="server" Text="Delete"/>
                                        </td>
                                    </tr>
                                </table>
                            </LayoutTemplate>
                        </eo:AJAXUploader>
                    </td>
                </tr>
                <tr>
                    <td align="center" valign="top" colspan="2">
                        <br /><br />                       
                        <input type="button" id="ui_btn_CancelVideo" runat="server" value=" Cancel " onclick="eo_GetObject('NewVideoMessage').close();" />
                    </center><br /><br />
                    </td>
                </tr>
            </table>            
        </ContentTemplate>
        </eo:Dialog>
    </div>
    </form>
</body>
</html>


Code: C#
using System;

public partial class Lims_test_UploaderTest : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
eo_support
Posted: Monday, October 5, 2009 11:53:24 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

Try to turn off shadow on the dialog (set ShadowDepth to 0). Dialog shadow does not work with the uploader.

Thanks!
Duane
Posted: Monday, October 5, 2009 12:36:26 PM
Rank: Advanced Member
Groups: Member

Joined: 9/4/2007
Posts: 114
Yes, setting ShadowDepth = 0 on the Dialog resolved the grayed out look!

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.