Welcome Guest Search | Active Topics | Sign In | Register

Struggling with Uploader Options
Chris Felstead
Posted: Friday, January 30, 2009 8:15:18 AM
Rank: Member
Groups: Member

Joined: 1/21/2009
Posts: 22
Hi EO,

I am currently have a couple of problems with the file uploader. The first, which I'm not concentrating on right now is unreliablity (the AJAX seems to timeout about half the time). The one for the moment is the javascript functionality.

I have two js functions on my page.

Code: HTML/ASPX
<script type="text/javascript">
function UploadStarted() {
    document.getElementById('uploadinginprogress').style.display = 'none';
    alert('start upload');
}
function UploadComplete() {
    document.getElementById('uploadinginprogress').style.display = 'block';
    alert('finish upload');
}
</script>


My EO.Uploader is

Code: Visual Basic.NET
<eo:AJAXUploader ID="eouFile" runat="server" AutoUpload="True" MaxFileCount="1" 
                                    ProgressBarSkin="Windows_Vista" 
                                    TempFileLocation="E:\Sandbox\V5 Doc Store\TempUploads" Width="250px" 
                                    PostedFileLabelFormat="{posted_file_name} ({posted_file_size} bytes)" 
                                    ClientSideOnDone="UploadComplete()" 
                                    ClientSideOnStart="UploadStarted()">
                                    <LayoutTemplate>
                                        <table border="0" cellpadding="2" cellspacing="0" width="250px">
                                            <tr>
                                                <td>
                                                    <asp:PlaceHolder ID="InputPlaceHolder" runat="server">Input Box Place Holder
                                                    </asp:PlaceHolder>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Button ID="UploadButton" runat="server" Text="Upload" Visible="False" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <eo:ProgressBar ID="ProgressBar" runat="server" ControlSkinID="Windows_XP" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td>
                                                    <asp:PlaceHolder ID="ProgressTextPlaceHolder" runat="server">Progress Text Place 
                                                        Holder</asp:PlaceHolder>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td align="right">
                                                    <asp:Button ID="CancelButton" runat="server" Text="Cancel" Visible="False" />
                                                </td>
                                                <tr>
                                                    <td>
                                                        <asp:PlaceHolder ID="PostedFilesPlaceHolder" runat="server">Posted 
                                                            Files Place Holder</asp:PlaceHolder>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td align="right">
                                                        <asp:Button ID="DeleteButton" runat="server" Text="Delete Selected Files" 
                                                            Visible="False" />
                                                    </td>
                                                </tr>
                                            </tr>
                                        </table>
                                    </LayoutTemplate>
                                </eo:AJAXUploader>


Finally, the relevant div looks like this

Code: HTML/ASPX
<div id="uploadinginprogress">
                                <asp:ImageButton ID="ibtnSave" runat="server" AlternateText="Save Changes" 
                                    Height="31px" Width="93px" />
                                    </div>


My problem is that the js functions don't appear to be getting called (hence the presence of the alerts). The div certainly isn't hiding/showing.

Regards,
Chris.
eo_support
Posted: Friday, January 30, 2009 8:53:33 AM
Rank: Administration
Groups: Administration

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

You would use

ClientSideOnDone="UploadComplete"

Instead of

ClientSideOnDone="UploadComplete()"

All our client event takes function name, not function call, because the control may pass arguments to your function. For details you may want to take a look of this topic:

http://doc.essentialobjects.com/ViewDoc.aspx?book=1&t=clientapi_howto.html

The time out issue might have to do with your server. I believe internally the time out value is 10 seconds, so when you are getting time out it means your server did not response in 10 seconds. That can cause a lot of issues. So you may want check the server first.

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.