enabling js function.