Fire a Javascript event when view has been created