Search code examples
javascriptxpagescustom-controls

How to access variable of custom control


I am using a custom control on an Xpage. Within this custom control I create JavaScript object. Later I want to use a function of this JavaScript object. My problem right now is that I can not access this JavaScript Object from my Xpage. Therefore my question is: Is there any way to pass this instance to my Xpage?


Solution

  • Solution: I defined my JavaObject globally (window.objName = ...). This enables me to access the object on the whole page.