Hello,
Is it possible to have multiple on click event for a button. Currently, my button brings me to another page but I also want the on click event to trigger a client action. But I cant set another onclick event.
Any suggestions? Thank you
Hello
You can trigger the button on click event using javascript
document.getElementById("Btn").addEventListener("click", RunAction);function RunAction() {$actions.GlobalClientAction() // this is your client action}
document.getElementById("Btn").addEventListener("click", RunAction);
function RunAction() {
$actions.GlobalClientAction() // this is your client action
}
I hope this will help
Best Regards
Tousif Khan
Hello Tousif Khan,
Thank you so much for your help, but would it be possible for you to provide a sample oml on how to do this? I am not good with javascript and where to use it . Thank you!
Hi @Low Nico
You can directly call your client action in javascript;
Eg: $actions.YourClientActionName();
I have attached the OML, Please refer to it. Also see the Demo for the same Here.Hope it helps!
RegardsN_G
Thank you N_G! This helped alot ! I appreciate it!