Hi,
I am facing similar issues. I tried to use the Javascript Use API, but that is causing a few problems of its own. I created a separate JS file and called it in my HTML using the <data-sly-use>. So I am able to use the JS variables in my HTML, but it gives me error whenever I use JS functions such as 'alert()' or even on jquery calls. The workaround I got was to implement the JS within <script> tags of my component's HTML.
Is there any way of integrating the two?
My question can be accessed from here :
http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...