The current page setup has a button with a 'Mouse Up' action which runs a javascript code:
var a = this.getTemplate("HS");
a.spawn();
The script works fine, however, every time the button is pressed a duplicate template is created and so on. I'd like to find a way so that if the button is pressed more than once, either the previous template is removed or is replaced each time the button is pressed.
Thank you,
Mdog