handle onclick with dom