Click here to Skip to main content
15,890,410 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
how to ajax call in success method?

What I have tried:

how to ajax call in success method?
Posted
Updated 30-Jun-19 19:07pm

1 solution

You can call like this, I have called calculate(); function from success method of a BindData(); function

JavaScript
<script>
    function BindData() {
        $.ajax({
            type: "POST",
            url: "pageName.aspx/webMethodName",
            data: "{}",
            contentType: "application/json",
            dataType: "json",
            success: function (data) {
               //Success function
               calculate();
            }

        })

    }

   function calculate(){
      //do your stuff here
   }

</script>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900