• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
      • Appendix A - Installation
      • Appendix B - Keys Summary
      • Appendix C - Menu Summary
      • Appendix D - Toolbar Summary
      • Appendix E - Application Properties
        • Application Properties
        • Paradata Properties
        • Mapping Properties
        • Logic Settings
        • JavaScript Properties
        • JSON Serialization Properties
        • Advanced Features Properties
        • Change Message Properties
      • Appendix F - Converting Within IMPS or ISSA
      • Appendix G - Errors in Censuses and Surveys
      • Appendix H - File Types
      • Appendix I - JSON Representations
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

JavaScript Properties

To view options related to JavaScript execution, select Application Properties from the Options menu of a data entry, batch edit, or tabulation application, and then select the JavaScript section.
These properties apply to JavaScript executed in embedded JavaScript, not JavaScript executed in a web view.
Modules
Abort on application startup when a module cannot be loaded. If there are errors loading modules, the application will terminate if this setting is checked. A module loading error could occur when using the import statement to import a file that does not exist.
Action Invoker
Add the Action Invoker into the global object. When checked, an object that can be used to access the Action Invoker is created and inserted into the global object.
Action Invoker name: By default the name of the Invoker Action object is CS to match the name used in CSPro logic, but if preferred, a different name can be used.
Compiled Application Serialization
When creating a compiled application (.pen), CSPro logic is saved to the file as compiled bytecode and the actual logic is not contained in the .pen file. This setting controls how JavaScript files associated with the application are processed when creating a compiled application:
  • Scripts and bytecode: Both scripts and compiled bytecode are saved. This is the fastest and most flexible option, but results in the largest file.
  • Scripts only: Only the scripts are saved. This is a flexible option, but application startup will be slightly slower as the scripts will have to be evaluated.
  • Bytecode only: Only the compiled bytecode is saved. This results in the smallest file, but it is the least flexible option because it means that the compiled application can only be run on devices that share the same architecture as the CSPro Designer. Because the CSPro Designer uses a 32-bit instruction set, this means that the bytecode will not run on 64-bit devices, which include most Android devices. This setting is not recommended.
See also: JavaScript Use in CSPro