dont add javascript here . add it in your controller