How can I use ajax success data

Its form validate checker. How can i add ajax success message. after all validation I want to show success massage like “Your successfully signup“;

jQuery(function ($) {
    $('#username').blur(function(e) {
        var username = $('#username').val();
        $.ajax({
            type: 'POST',
            //url: 'http://localhost/stateway/user-signup/?username=' + username,
            url: 'http://localhost/blue_bucket/signup/?username=' + username,
            success: function (response) {
                $("#responseusername").html(response);
            }
        });
        e.preventDefault();
    });

    $('#email').blur(function(e) {
        var email = $('#email').val();
        $.ajax({
            type: 'POST',
            //url: 'http://localhost/stateway/user-signup/?email=' + email,
            url: 'http://localhost/blue_bucket/signup/?email=' + email,
            success: function (response) {
                $("#responseemail").html(response);
            }
        });
        e.preventDefault();
    });
});

Read more here: How can I use ajax success data

Leave a Reply

Your email address will not be published. Required fields are marked *