Add javascript for my function in dashboard