sets up the javascript to location search