0

Problem is written inside the success section.

$.ajax({
    url : 'path to file',
    dataType : 'json',
    type : 'POST',
    data: data,
    success : function(res)
    {
            // here I want to recive <div> in response.
            // then replacing the received <div> with existing one.
            // I don't know how I could send <div> in response.
            // How would I receive <div>, 
            // and How to replace it with the existing one.
             
    },
    error : function()
    {
            alert("failed");
    }
});
4
  • Do you have any parent div id or class?
    – ZealousWeb
    Feb 17, 2021 at 13:13
  • yes,I have parent <div> Feb 18, 2021 at 5:40
  • it is like <div class="parent"> <div class="child"> </div> </div> Feb 18, 2021 at 5:41
  • I want to replace the child <div> Feb 18, 2021 at 5:42

0

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.