Alert.open() in Javascript

Looking for a way to create this kind of dialog popup screen in Javascript:
Screen Shot 2024-01-29 at 14.48.37

I have a JSquery that I need to run on page load (which I have accomplished), but I need to force it to run a "alert" popup with a clickable action (not just the utils.showNotification() box).

I have tried:

  alert.open({
    title: 'Reminder',
    description: 'a description',
    actions: {
      OK: 'test',
      CANCEL: 'test1'
    },
    notificationType: "alert",
    duration: 5    
  });

But I'm not finding any documentation on alert.open() anywhere and not sure the proper syntax. Any help would be appreciated. Thanks!

1 Like

Hey @leviself56, unfortunately you can't open an alert from a JS query. If the notification doesn't meet your needs (ie: clickable action), then you'll probably want to open a modal.

You can add any component you need to the modal to complete the required actions. They are also able to be opened / closed programmatically from the JS query with modalFrame.show() and modalFrame.hide().