App Builder \ PfJs Helper Class
Embed Screen | PfJs.embedScreen(divId, screenIdent)
App Builder & Automation Expert
Stay Updated with ProcFu!
Subscribe to our newsletter for the latest tips, updates, and automation insights.
Subscribe NowThe PfJs.embedScreen function is designed to dynamically inject another screen into a specified <div> element on your webpage enhancing the interactivity and complexity of your app's interface without requiring a page reload.
There are several usecases such as injecting a summary screen into a detail screen. Example: Injecting list of tasks within the detail view of an employee.
Arguments
- divId: The ID of the <div> element where the screen will be embedded.
- screenIdent: The identifier (numerical ID) of the screen to be injected.
Usage
- First, ensure there is a <div> element within your HTML structure with a unique ID where you want the screen to appear.
- Call PfJs.embedScreen, passing the ID of the <div> and the identifier of the screen you wish to embed.
Example
Suppose you want to embed a summary screen, identified as screen number 4, inside a detail screen.
First, create a <div> with an ID where this screen will be loaded:
Then, use the PfJs.embedScreen function to inject the screen into the specified <div>
<div id="detailDiv"></div>
PfJs.embedScreen("detailDiv", "4");
This approach seamlessly integrates additional content directly within your existing page layout, making it ideal for expanding the informational depth accessible to users without navigating away from the current context.