1 Reply Latest reply: Aug 29, 2017 1:49 AM by Aiham Azmeh RSS

    Problem Removing BM in QlikSense MashUp

    Claudia Drey

      Hello everybody,

       

      I have a poblem with removing Bookmarks in my MashUp.

      I think the problem is, that my click function for deleting doesn' t work.

      Here is my code:

       

      app.getList("BookmarkList",function(reply){

      console.log(reply);

       

      var counter = 0

      $.each(reply.qBookmarkList.qItems, function (key, value){

      console.log(value);

      $('#bmTable > tbody:last-child').append("<tr><td><a id = 'link_"+ counter +"'field='" + value.qInfo.qId +

      "' href = '#' class='bmLink'>" + value.qData.title + "</a></td><td>" +value.qData.description +"</td><td><a href = '#' class='bmDelete'><span class='glyphicon glyphicon-trash' ></span></a></td></tr>")

      counter +=1;

       

      $('.bmLink').on('click', function (e){

      e.preventDefault();

      var elem = $(this);

      app.bookmark.apply(elem.attr("field"));

      });

       

      $('.bmDelete').on('click', function (a){

      a.preventDefault();

      var elem = $(this);

      app.bookmark.remove(elem.attr("field"));

      });

       

      });

      });

       

      Any ideas?

       

      Thanks!!

       

      Claudia