Introduction
In this article, we will show you how to make a nested datalist to expand in an iframe.
Implementation
You can use the following script in a custom HTML field in a form and alter the code based on your app.
Code Block |
---|
|
<iframe name='iframe' id="iframeLoanedItems" src="/jw/web/userview/Onlinekb_GamingnestedDatalistIFrame/v/OGP_App/basicForm_/reportViewCurdcrud?embed=true" frameborder="0" border="0" cellspacing="0" height="500px" scrolling="yes" style="border-style: none;width: 100%"></iframe>
<script>
$(document).ready(function(){
$('iframe#iframeLoanedItems').load(function(){
$('.nesteddl_trigger', $('iframe#iframeLoanedItems').contents()).trigger('click');
})
})
</script> |
...
To embed a list inside an iframe you will need to use the <iframe> attribute and target the Menu ID containing the list. In this case "reportViewCurdbasicForm_crud" is the targeted Menu.
Image Removed
Image Added
Figure 1: Targeted Menu ID
...
Note |
---|
|
Do take note "embed=true" is important. If not inserted in src, the whole targeted page will be displayed in the iframe instead of the List only. |
Sample App
Download the sample app below:dx8_Online_GamingnestedDatalistIFrame.jwa | height | 250 |
---|
|