0
<asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="upSchedule" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
        <ContentTemplate>
            <script type="text/javascript">
                function afterRender(data) {
                // code
                }
            </script>
            <div style="margin-bottom:5px">
                Izberi:&nbsp;
                <a href="javascript:dpc1.commandCallBack('previous');">Predhodnji teden</a> -
                <a href="javascript:dpc1.commandCallBack('next');">Naslednji teden</a> -
                <a href="javascript:dpc1.commandCallBack('today');">Danes</a> -
                <a href="javascript:dpc1.commandCallBack('week');">Začetek tedna</a>
            </div>
            <br />
            <table style="width:100%">
                <tr>
                    <td valign="top" style="width:150px">
                        <DayPilot:DayPilotNavigator ID="dpnOrders" runat="server" 
                            BoundDayPilotID="dpcOrders" 

i need to call pure JS inside UpdatePanel becouse of DayPilotPro but when i am using UpdatePanel this is not possible. How can i call it?

2 Answers 2

1

Yes this will work. But make sure that the script is placed below the ScriptManager.

   Sys.WebForms.PageRequestManager.getInstance().add_beginRequest(BeginRequestHandler); 
                   Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
                        //Before callback event handler
                        function BeginRequestHandler(sender, args) {

                        }
                        //After callback event handler
                        function EndRequestHandler(sender, args) {

                        }
Sign up to request clarification or add additional context in comments.

1 Comment

You can put it inside the script tag which is placed below the Scriptmanager. Please refer below. <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <script type="text/javascript"> </script>
1

you write

 prm = Sys.WebForms.PageRequestManager.getInstance();

 prm.add_pageLoaded(loadData)

 prm.add_beginRequest(afterRender)


    function loadData(sender,args)
    {

    }

    function afterRender(sender, args)
    {

    }

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.