Dwdtemplate - added javascript coding