Change loading of JavaScript to JHtml call