Show/Hide Toolbars

PerfectApps™ Help Guide

Navigation: Resources > Example Applications

Call JavaScript Function

Scroll Prev Top Next More

An external JavaScript function can be called by a behavior on an app or report. The app or report can be embedded in a Web page with the JavaScript code included in that Web page or DOM functions can also be used.

 

This opens paths for integration. For example, the user can write a JavaScript function that makes AJAX calls to retrieve data from a server (using a proxy page). The app or report can then call this JavaScript function to indirectly retrieve this data from the server, instead of using PerfectApps built-in Connection features. You can also invoke browser functions directly as in the following example:

 

Document.getElementbyid(‘TextFieldName’)

 

Instead of:

Function GetTextFieldName(fieldName){

               return document.getElementbyid (fieldName);

}

 

It is advisable that users be familiar with HTML and JavaScript concepts before attempting to integrate their apps and reports with Web page code. The World Wide Web Consortium contains extensive tutorials on the capabilities of JavaScript and JavaScript functions. JavaScript Tutorial

 

flag_green

To download this app, click here. Then extract and import the app. Log on to PerfectApps, go to the Apps Workspace and click the Import button. Then select the app file you saved locally (.PA or .PF) and continue through the import steps.

 

To learn how to import an app into your account see App Management Video Tutorials

 

 

Return to Example Applications