I am submitting the form by ajax. It's working properly but I have one issue with the success message.

After ajax success, I have to display success message like default Magento2. How can I achieve this?

    url: "<?php echo $block->getUrl('frontname/order/save'); ?>",
    type: "POST",
    dataType: "text",
    data: "cancel= " + orderJSON,
    showLoader: true,
    success: function () {
    $("#" + id).remove();

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.