The links.load() method loads link data directly from the specified URL using an HTTP request. As soon as it receives a response, the JavaScript Scheduler component updates the view and displays the links.
Declaration
DayPilot.Scheduler.links.load(url[, success[, error[, options]]])Parameters
url(string) - JSON endpoint URLsuccess(function) - success callback. Theargsobject provides the response data inargs.dataand lets you cancel the default handling usingargs.preventDefault().error(function) - error callback. Theargsobject provides the failedrequestand the thrownexception.options(object) - additional options. UsedontAddStartEnd(boolean) to prevent adding the current viewport start and end dates to the query string.
Notes
Set options.dontAddStartEnd to true if the endpoint should not receive the current viewport start and end dates in the query string.
Example
dp.links.load("/api/links", (args) => {
dp.message("Links loaded");
});See Also
Links API [doc.daypilot.org]
Dependency Links in the Scheduler Component [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot