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

Run Javascript after Ajax Update

1 Answer 129 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Andy Green
Top achievements
Rank 1
Andy Green asked on 10 Sep 2009, 09:03 AM
Hi

I have the following that loads a Javascript function to run on page load:

        Dim MasterBody As HtmlGenericControl = Me.Master.body
        MasterBody.Attributes.Add("onload", "DoDetailsCalc()")

Depending upon the users preferences the javascript to run will either be DoDetailsCalc() as shown or DoTotalsCalc(). This is why I load it from code behind.

When I perform an update to the page, I want it to recalculate, this was working fine, until I put a RadAjaxManager on the page.

The page load is no longer firing in this situation.

How do I re run the javascript?

Andy

1 Answer, 1 is accepted

Sort by
0
Accepted
Sebastian
Telerik team
answered on 10 Sep 2009, 10:14 AM
Hello Andy,

How to execute custom javascript when an ajax request finishes execution you can see from this article in the RadAjax documentation. Feel free to choose the approach which suits your needs best.

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Ajax
Asked by
Andy Green
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Share this question
or