Creating emtpy function to check if page load occurred.
Appending message to the body when the page load event occurs.
Replacing deprecated event with new event.