Trigger a function on page load (solved)