issue #2 Onclick is working by update