Click here to Skip to main content
15,888,401 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have called ajax call that had worked successfully with success function also but i have used on modal popup in my project. once modal popup closed then i had called ajax cal at the time action method called that had excuted sucessfully with return 200 status but success function parameter didn't get the json object of action method

C#
$.ajax({
         async: false,
         dataType: "json",
         type: "POST",
         url: '/Orders/delivery',
         data: JSON.stringify({ businessAddressId: _businessAddressId, Latitude: lat, Longitude: long, postalCode: code }),
         contentType: 'application/json; charset=utf-8',
         success: function (result) {
             if (result.status == true) {
                 debugger;
                 checkresult = result.status;

             $('#AddressSearch1').text(result.message)
         },
         error: function (xhr, ajaxOptions, thrownError) {
             //alert('error');
         }
     });


please help me.
thanks

What I have tried:

i have called ajax call that had worked successfully with success function also but i have used on modal popup in my project. once modal popup closed then i had called ajax cal at the time action method called that had excuted sucessfully with return 200 status but success function parameter didn't get the json object of action method
Posted
Updated 23-Feb-21 0:02am
v3
Comments
20212a 23-Feb-21 14:16pm    
I do not understand.
Richard Deeming 24-Feb-21 4:46am    
There's a missing closing } in your success function.

Beyond that, we can't tell you what the problem is, since we can't see the server-side code that's executing in response to your AJAX request.

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