views:

14

answers:

0

hi folks
I have this page and it gives me script error "getbyelement..."

<script type="text/javascript" language="javascript">

function uploadError(sender, args) {
    document.getElementById('lblStatus').innerText = args.get_fileName(), "<span style='color:red;'>" + args.get_errorMessage() + "</span>";
}

function StartUpload(sender, args) {
    document.getElementById('lblStatus').innerText = 'Uploading Started.';
}

function UploadComplete(sender, args) {
    var filename = args.get_fileName();
    var contentType = args.get_contentType();
    var text = "Size of " + filename + " is " + args.get_length() + " bytes";
    if (contentType.length > 0) {
        text += " and content type is '" + contentType + "'.";
    }
    document.getElementById('lblStatus').innerText = text;
}

<asp:scriptmanager id="ScriptManager1" runat="server">
    </asp:scriptmanager>
<asp:updatepanel id="UpdatePanel1" runat="server">
        <ContentTemplate>
            <asp:TabContainer ID="TabContainer1" runat="server" ActiveTabIndex="0" Width="600px">
                <asp:TabPanel ID="TabPanel1" runat="server" HeaderText="View">
                    <ContentTemplate>                 
                        another content
                    </ContentTemplate>
                </asp:TabPanel>
                <asp:TabPanel ID="TabPanel2" runat="server" HeaderText="New">
                    <ContentTemplate>
                        <table width="400px">
                            <tr>                         
                                <td>                                      
                                    <asp:AsyncFileUpload ID="AsyncFileUpload1" runat="server" Width="258px" OnClientUploadError="uploadError"
                                        OnClientUploadStarted="StartUpload" OnClientUploadComplete="UploadComplete"
                                        ThrobberID="Throbber" UploadingBackColor="#66CCFF" FailedValidation="False" />
                                    &nbsp;
                                    <asp:Label ID="Throbber" runat="server" Style="display: none">
                                          <img src="img/indicator.gif" align="absmiddle" alt="loading" />
                                    </asp:Label>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    &nbsp;
                                </td>
                                <td>
                                    <asp:Label ID="lblStatus" runat="server" Style="font-family: Arial; font-size: small;" />
                                </td>
                            </tr>              
                        </table>
                    </ContentTemplate>
                </asp:TabPanel>
            </asp:TabContainer>
        </ContentTemplate>
    </asp:updatepanel>