You are here: Web Apps with Visual LANSA > 11. Using SYS_WEB to access Browser and JavaScript Features > 11.1 Alert, Confirm and Prompt Boxes

11.1 Alert, Confirm and Prompt Boxes

JavaScript supports three different types of popups – an alert, a confirm and a prompt box. All three types of popup are available in Visual LANSA as methods on SYS_WEB.

Alert Box

An alert box is typically used if you want to make sure information goes through to the user. When an alert box pops up, the user must click "OK" for processing to continue.

To issue an alert include code something like:

 

#sys_web.alert( 'Hello world' )

 

The alert will appear slightly differently depending on the browser being used. For example, in Edge:

And the same alert processed in Chrome: