getJsNamespace() function for generating JS templates

Change-Id: I44664fba38391f30e9dee3df39a834730b7eded7