DayPilot.Modal.showUrl

The showUrl() method displays the modal dialog and loads the content from the specified URL.

Declaration

DayPilot.Modal.showUrl(url);

Parameters

  • url (string) - content page URL

Notes

The modal dialog content is displayed using an <iframe>. That means the content page will run in a different JavaScript context. In order to reach the parent window you can use the parent object. You can also reach the DayPilot.Modal instance that opened this dialog using DayPilot.Modal.opener() method (please note that the daypilot-modal.js script must be included in the content page in order to access DayPilot.Modal).

Example

const modal = new DayPilot.Modal({
  onClose: args => {
    console.log("result", args.result);
  }
});
modal.showUrl("/edit/123");