XF 2.1 Including Javascript on Page Node

penturners

Active member
Trying to use a js menu on a page node. I put the following in the template html of the page node, but nothing loads. The files are present and they work if I load the equivalent html on an html page external to XF. Any thoughts on what I'm doing wrong?

HTML:
<xf:js src="http://www.mysite.org/milonic/milonic_src.js" />
<xf:js src="http://www.mysite.org/milonic/mmenudom.js" />
<xf:js src="http://remote.mysite.org/library/mainmenu.js" />
 
It definitely loads in the source code, just tried:

Screenshot_10.webp


Screenshot_9.webp

This loads in the body, not the head. Not sure if that's a requirement for your js.
 
I finally got this sorted out. The issue was that either my host or XF doesn't like to load JS from another server. I moved what was I was trying to load from the "remote" host to the same server as XF, and it loads fine in page node html as well as an html widget.
 
Back
Top Bottom