Quantcast
Channel: Adobe Community : All Content - LiveCycle Designer
Viewing all articles
Browse latest Browse all 5571

Adding a Namespace Object to the XFA Object

$
0
0

Hi,

 

I'm looking into optimizing the code in my forms. I noticed that, unlike most of the other LiveCycle Objects, the root XFA Object is enumerable and writable, and I was just wondering if anyone knows if it's safe to create my own Namespace Object and add it as a property of the XFA Object. If it is ok to do this, then it would be a great way to store all the form properties... all your Script Objects could point to the same location. I was able to get it to work using the following code:

 

//create global namespace object
var OBJ = ( function() {
          if ( typeof xfa.OBJ === "undefined" ) {
               xfa.OBJ = {};
          }
          return xfa.OBJ;
     }());


Thanks,

Anthony


Viewing all articles
Browse latest Browse all 5571

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>