views:

431

answers:

2

I have a page which uses cufon and asp:UpdatePanel. After ajax callback the new content does not replace tags with cufon. I've tried:

<script type="text/javascript">
    alert('Cufon refresh start!');
    Cufon.refresh();
    alert('Cufon must be ok!');
</script>

But don't get any alert or cufon replacement.

A: 

Related to http://stackoverflow.com/questions/1152946/how-to-have-a-javascript-callback-executed-after-an-update-panel-postback I've used pageLoad event which is triggered after each postback:

<script type="text/javascript">
    function pageLoad(sender, args) {
        Cufon.refresh();
    }
</script>
HasanGursoy
+1  A: 

I use the following

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, args) {
//rebind jquery here after update panel async postback!
    InitSlider();
    Cufon.refresh();

}