Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • pat 124 posts 346 karma points
    4 days ago
    pat
    0

    buttons in partial render inside a partial does not work

    Hi all, I have a surfaceController and a partial view. I am listing few records with edit button on click edit button usng $.ajax GET I am loading another partial view into a div in the Current View.

    This load my new partial view successfully but when I click button on new view it just reload the second with without page layout. on button click I am calling a ajax Post to update date and return a Json string

    I have seen posts saying click event is not registered in second view so i have added click event on document ready function.

  • Paul Seal from codeshare.co.uk 246 posts 1126 karma points c-trib
    4 days ago
    Paul Seal from codeshare.co.uk
    0

    Hi

    Are you using:

    $(document).on('click', function() {
     //blah
    });
    
  • pat 124 posts 346 karma points
    4 days ago
    pat
    0

    Paul I have enter more details in new post please look at this https://our.umbraco.org/forum/extending-umbraco-and-using-the-api/89611-buttons-in-partial-render-inside-a-partial-does-not-work

    i have added line like below , is it worng

    $('#updatebtn').on('click' , function(e){
    
  • pat 124 posts 346 karma points
    4 days ago
    pat
    0

    Paul I have noticed that even though new edit partial view render to page it does not refresh page code in debug mode.... i cannot see html in elements .... this look so wrong...

  • Paul Seal from codeshare.co.uk 246 posts 1126 karma points c-trib
    4 days ago
    Paul Seal from codeshare.co.uk
    0

    Yes I would say it is wrong because it won't be bound if it came in with the ajax result. You want something like this:

    $(document).on('click', '#updatebtn', function(e){
    
Please Sign in or register to post replies

Write your reply to:

Draft