dbembibre
Active member
I need to load a external js file only in web mode.
I did this inside a new template, is working fine, but i dont know if is the good way.
I did this inside a new template, is working fine, but i dont know if is the good way.
Code:
<script>
width = document.documentElement.clientWidth;
if (width > 750)
{
<xen:if is="!{xen:helper ismemberof, $visitor, 19,4,3,5,20,25}">
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'http://web.com/show.jsp?id=624449&cor=002E0';
document.getElementsByTagName('head')[0].appendChild(script);
</xen:if>
}
</script>