started boilerplate javascript for ajax