changed tpl for javascript