• <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
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Action Invoker
      • Overview
      • Execution Environments
      • Security and Formatting Options
      • Base Actions
      • Application Namespace
      • Clipboard Namespace
      • Data Namespace
      • Dictionary Namespace
      • File Namespace
      • Hash Namespace
      • Localhost Namespace
      • Logic Namespace
      • Message Namespace
      • Path Namespace
      • Settings Namespace
      • Sqlite Namespace
      • System Namespace
      • UI Namespace
        • UI Action Invoker Namespace
        • UI.alert Action
        • UI.closeDialog Action
        • UI.enumerateWebViews Action
        • UI.getDisplayOptions Action
        • UI.getInputData Action
        • UI.getMaxDisplayDimensions Action
        • UI.postWebMessage Action
        • UI.setDisplayOptions Action
        • UI.showDialog Action
        • UI.view Action
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

UI.alert Action

Format
CS.UI.alert(text := ... ʃ, title := ...ʅ)
ArgumentDescriptionTypes / Required
textThe message to display.string
required
titleThe dialog's title.string
not required
Description
The UI.alert action displays an alert dialog using the same HTML dialog used by the errmsg function. The dialog displays the text. The dialog's title defaults to "Alert", but this can be overridden by providing a title.
Return Value
The action returns undefined.
Exceptions
The action throws an exception if any of its arguments are not specified in a valid form.
Example (HTML + JavaScript)
This example uses the asynchronous version of UI.alert to ensure that the action does not block the current thread:
<script>
    const CS = new CSProActionInvoker();

    CS.UI.alertAsync({
        title: "Synchronization Error",
        text: "There was an error sending the data to the server!"
    });
</script>
See also: UI Action Invoker Namespace, UI.showDialog Action