Setup javascript by controller