trying to setup a javascript to load the page