Wednesday, 10 September 2014

JQuery AJAX call for web services / jsp / asp.net page

with out data 
       $.ajax({
            type: "POST",
            url: " web services / jsp / asp.net page",
            dataType: "text",
            async:false,
            contentType: "application/json; charset=utf-8",
            success: function (data) {
                Success = true;//doesnt goes here
            },
            error: function (textStatus, errorThrown) {
                Success = false;//doesnt goes here
            }

        });
with passing data on server
        $.ajax({
            type: "POST",
            url: " web services / jsp / asp.net page",
            dataType: "text",
            async:false,
            data: JSON.stringify({ json object }),

            contentType: "application/json; charset=utf-8",
            success: function (data) {
                Success = true;//doesnt goes here
            },
            error: function (textStatus, errorThrown) {
                Success = false;//doesnt goes here
            }

        });

            

No comments:

Post a Comment