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

Run Javascript After Postback

2 Answers 176 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 20 May 2013, 03:48 PM
Hi,

I am attempting to use the technique outlined in this article:

http://www.telerik.com/help/aspnet-ajax/ajax-execute-custom-javascript.html

However, I am getting this error:

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object. 

I suspect that the error might be because the AjaxRadManager event is triggered from a button click where the button is located inside a RadWindow.  However, with this RadWindow, we are using a ContentTemplate.  So, to me, that means that the code run from controls is being run from the parent page (if I understand the hierarchy senario correctly).

Any recommendations?

Jim

2 Answers, 1 is accepted

Sort by
0
James
Top achievements
Rank 1
answered on 22 May 2013, 02:14 AM
As sometimes happens, as I prepared a sample project to display that problem, I found my error.  I simply had an un-trapped error occurring just before I tried to run my JS.  After I fixed the error, this procedure worked perfectly.  Thanks for the help!
0
Pavlina
Telerik team
answered on 23 May 2013, 09:43 AM
Hello James,

I am glad that you were able to resolve the problem on your own. If other questions or problems arise, do not hesitate to write us back in the support ticket you have opened on the matter.

Regards,
Pavlina
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 their blog feed now.
Tags
Ajax
Asked by
James
Top achievements
Rank 1
Answers by
James
Top achievements
Rank 1
Pavlina
Telerik team
Share this question
or