Init JS to make ajax request