$p.events.on_editor_load
Overview¶
This explains how to specify the method to be executed when the "Edit screen" is loaded. This method should be used mainly when you want to execute a script when "Use Ajax for Record Transitions" or "Edit with dialog" is checked.
Limitations¶
- Select "All" for "Output to", except where this would have side effects such as the process running at unintended times.
-
If you create multiple scripts and write this function in each of them, the scripts are overwritten, so only the latest one works. For a workaround, refer to the following FAQ.
Syntax¶
Check New or Edit for the script output destination.
JavaScript¶
Usage Examples¶
If you set the following sample code to Pleasanter script, a message will be displayed at the bottom of the screen when the editing screen is loaded.
JavaScript¶
$p.events.on_editor_load = function () {
$p.setMessage('#Message', JSON.stringify({
Css: 'alert-success',
Text: 'Now that the editing screen has loaded, let's display the screen.'
}));
}
Related Information¶
FAQ: I want to be able to set multiple $p.events.on_editor_load