Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

Capturing delete event using custom js

$
0
0

Hi All,

I have following custom js code to capture delete event on library item 

Once user clicks on ... hover menu for item opens and has ... to capture click of ... hover I have 

$(".js-callout-action.ms-calloutLinkEnabled.ms-calloutLink.js-ellipsis25-a").click(function() {
    console.log("... on hover clicked);
});

The menu then shows me Delete option and to capture delete event I have following code :

$("#ID_DeleteDocItem").click(function() {
            console.log("delete called");
      });

But the issue delete is clicked, sharepoint has a alert - Are you sure you want send items to Recycle bin? with OK and Cancel button, and this is the issue I am unable to capture the alert and button click on OK or Cancel 

I want to call a custom function on click of Delete file

 

Thanks in Advance, Jiniv Thakkar


Viewing all articles
Browse latest Browse all 7589

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>