how can i bind a socket.io function to a button onclick?