Search code examples
htmlxpages

xpages how to call other database js library in resources


How to import other database (content.nsf) javascript libray into my current databases resources in xpages. The below code is not loading the common.js file. Correct me

<xp:this.resources> <xp:script src="resources\content.nsf\common.js" clientSide="true"></xp:script> </xp:this.resources>


Solution

  • Add a / in fron my of src to make the path absolute instead of relative. So:

    src="/resources\content.nsf\common.js"