This is a migrated thread and some comments may be shown as answers.

Uncaught TypeError: Cannot read property 'id' of undefined

5 Answers 1154 Views
AsyncUpload
This is a migrated thread and some comments may be shown as answers.
Vuyiswa
Top achievements
Rank 2
Vuyiswa asked on 10 Jun 2013, 06:39 PM
I am using RadAsyncUpload which is defined like this 

<telerik:RadAsyncUpload ID="FileUpload1" runat="server" Skin="Forest" Width="272px">
</telerik:RadAsyncUpload>

and i have a asp.net button defined like this 

<asp:Button ID="btnUpload" Width="180px"  Height="30px" runat="server" Text="Upload"
                           onclick="btnUpload_Click" />

Now it works and it uploads the file , but now i want to have a Progress Bar , so like other controls i did the following 

<telerik:AjaxSetting AjaxControlID="btnUpload">
    <UpdatedControls>
          <telerik:AjaxUpdatedControl ControlID="btnUpload" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
     
        <telerik:AjaxUpdatedControl ControlID="FileUpload1" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
         
        <telerik:AjaxUpdatedControl ControlID="lblMessage" LoadingPanelID="RadAjaxLoadingPanel1"></telerik:AjaxUpdatedControl>
 
    </UpdatedControls>
</telerik:AjaxSetting>

    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
    </telerik:RadAjaxLoadingPanel>

if i add this Ajax code , my Upload does not work , it give me the Following Error 
Uncaught TypeError: Cannot read property 'id' of undefined
 
and chrome gives more info like
 
Uncaught TypeError: Cannot read property 'id' of undefined Telerik.Web.UI.WebResource.axd:2889
Telerik.Web.UI.RadAjaxControl._initializeRequest Telerik.Web.UI.WebResource.axd:2889
H.z.callBaseMethod Telerik.Web.UI.WebResource.axd:3
Telerik.Web.UI.RadAjaxManager._initializeRequest Telerik.Web.UI.WebResource.axd:3463
(anonymous function) Telerik.Web.UI.WebResource.axd:3
(anonymous function) Telerik.Web.UI.WebResource.axd:3
H.w.raiseEvent Telerik.Web.UI.WebResource.axd:3
e._onFormSubmit Telerik.Web.UI.WebResource.axd:9
e._doPostBack Telerik.Web.UI.WebResource.axd:9
(anonymous function) Telerik.Web.UI.WebResource.axd:3
onclick

Thanks 

5 Answers, 1 is accepted

Sort by
0
Hristo Valyavicharski
Telerik team
answered on 13 Jun 2013, 01:26 PM
Hi Vuyiswa,

Pasted code snippet works fine. Here you can see video of my testing. This forum thread discuss the possible reason which cause the same error and how eventually to resolve it. Please check it out.

Regards,
Hristo Valyavicharski
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Vuyiswa
Top achievements
Rank 2
answered on 15 Jun 2013, 11:02 AM
Thanks Admin , 

I have done that ,  have a Proxymanager in my content pages and have Ajax manager in my master page, but now the loadingPanel Appears on all controls including the textboxes , i want it to only appear for a Gridview
0
Accepted
Plamen
Telerik team
answered on 20 Jun 2013, 08:32 AM
Hello,

 
You can explicitly set on which control to show the loading panel. You can refer to this help topic where similar issue is described.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Vuyiswa
Top achievements
Rank 2
answered on 15 Jul 2013, 08:25 PM
Good Day Admin

Sorry for a late reply, i am jumping from one project to another. One more thing i realized that is causing this is that i am replacing Ajaxtoolkit controls with Telerik Controls , so i need to do this a bit by bit , so in this page there are some other Ajaxtoolkit that i want to keep for now , i will replace them later. i have attached a link to that project

Link to Example Project

Thanks
0
Scott Christopher Stauffer
Top achievements
Rank 2
answered on 08 Feb 2017, 04:05 PM

I realize I am necro-ing this thread, but I ran into the same problem and found a solution.

Set the ClientIDMode to AutoID of the web control you are trying to get AutoPostBack working for. That fixes the client-side error, and consequently fixes the server-side by allowing the AJAX POST to occur.

Tags
AsyncUpload
Asked by
Vuyiswa
Top achievements
Rank 2
Answers by
Hristo Valyavicharski
Telerik team
Vuyiswa
Top achievements
Rank 2
Plamen
Telerik team
Scott Christopher Stauffer
Top achievements
Rank 2
Share this question
or