Jump to content

[Solved] Add javascript code in the footer: ex uservoice widget


Recommended Posts

  • 1 year later...

I don't know which file you added your javascript.
if you add the javascript directly to theme file (footer.tpl), then it could be because of "{" and "}"
because the theme file will be compile by smarty and that's the problem.

I suggest you write the JS in a seperated files and use the file link.

or please embrace your javascript with

{literal}


You JS code here


{/literal}

Link to comment
Share on other sites

Hi shokinro

Thank you very much for your reply. Could you tell me what line of the file footer.tlp I add the JavaScript code UserVoice? The code looks like this!

{[removed]
 (function() {
   var uv = document.createElement('script'); uv.type = 'text/javascript'; uv.async = true;
   uv.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'widget.uservoice.com/myID_API.js';
   var s = document.getElementsByTagName('script')[0]; s[removed].insertBefore(uv, s);
 })();
[removed]}



Thank you

Link to comment
Share on other sites

×
×
  • Create New...