- alert method : Displays an alert box with a message and an OK button.
- prompt method : Displays a dialog box that prompts the visitor for input.
We need to define the methods (alert and prompt), which have to be static methods, along with their parameters.
ExternalObjectWindow.alert('Read the license agreement first.')
&outdata = ExternalObjectWindow.prompt(' ')
Note that we don't define a variable based on the External Object type because the methods we are calling are static. And, if your External Object's method has a return value it cannot be invoked from any event that has any server side code, like calling a Procedure object (the Procedure cannot be called on the same event that is calling the method wich returns a value).
Download the sample from Window Object interaction sample.
How to execute GeneXus events from JS code using External Objects
How to implement a dictionary data type using JS and server side code