Additional dialog box issue in grafana text plugin

i have created three buttons in grafana using text plugins…
these text plugins has html which displays a button which when clicked sends a post request to my web server using javascript.
when you click the the button it prompts for a confirmation.
but when one button is clicked it prompts both the confirmations.
for example:

i have two buttons b1 and b2, when each one of them are pressed a prompt is supposed to pop up which asks for confirmation of action.
but when i press b1 it asks for two confirmation in quick succession and completes both button’s tasks one after another.

can someone help

This sounds like something is wrong with your JavaScript. Does it work outside of Grafana?