Dynamic Height for Page Viewer Web Part
Original Post by Cee (Imported from Ardevia Forum)
- Embed your form into a Page Viewer web part using these instructions --
Embedding list form in any page
- Go back into Ardevia Rich Forms and edit your form
- Click on the [Behavior] Tab
- Click on the [Edit] icon in the 'Form Load Actions' section
- Click on [Add Action]
- Name your action
- Choose 'Execute Script' from the dropdown
- Paste in the following code --
Code:
$(function(){
var D = document;
var dheight = Math.max(
Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
Math.max(D.body.clientHeight, D.documentElement.clientHeight)
);
var parentFrame = parent.document.getElementById(window.name);
/* Only run if in frame */
if(parentFrame){
parentFrame.style.height = dheight + 'px';
}
})
9. Click [Save]
0
Please sign in to leave a comment.
Comments
0 comments