inline javascript with template