//You can create a single function that calls both of those, and then use it in the event. function myFunction(){ pay(); cls(); }