I have a html tag (image input) with id that looks like “delete-party-image”.
On click, it should call XHR-ly to a server action, named DeletePartyImage.
Naively I did
var action = btn.id.replace('-', '');
Yeah, I already knew that, but have forgot it just when I needed it.
var action = btn.id.replace(/-/g, '');