Trying to make the javascript work by adding it directly to the template