Both connect working with the addition of an onclick event instead of onload