Problem with onClick() event

@bertolinoand
The connection exists in both cases.
Now ask yourself what could be else wrong?