Quantcast
Channel: GoJS - Northwoods Software
Viewing all articles
Browse latest Browse all 7069

Confirm before delete

$
0
0

@Milamdo wrote:

Hi
how can I set confirm before deleting an element, I tested with this jquery code and it works:

e.cancel = !confirm("Are you sure?");

But I want to use it with a bootstrap modal to confirm which does not return true as a result doesn't work

My code: -----------------------------------------------------------------------------------

if (typeof args.OnDelete == 'function') {
myDiagram.addDiagramListener("SelectionDeleting", function (e) {
args.OnDelete(e);
});
}

OnDelete: function (e) {
e.cancel = $("#myModal").modal('show');
}


And I set onclick="return true" on my confirm button

Is there any way to fix this?
Any help?

Thanks,
Milamdo

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 7069

Trending Articles