Skip to Main Content

PeopleSoft Enterprise

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Pagelets auto resize

user410911Dec 6 2012 — edited Dec 19 2012
Hi All,

We are facing an issue with pagelet resize. We are in PT8.52.12.
We have iScript based pagelets. In iScript we will generate the URL of page and then will pass this URL to an iFrame.
Given Below is the iframe code.

+<iframe id="%Bind(:2)" src="%Bind(:1)" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:block"> </iframe>+

We need to resize the pagelet based on the content of the page.
We tried with the below function. It works some times. Sometimes it is unable to find the element in the page.

+<html>+
+<script>+
+function resize(){+
myFrame = document.getElementById("%Bind(:2)");
+setInterval(function(){myFrame.heig ht = myFrame.contentWindow.document.body.scrollHeight}, 1);+
+}+
+</script>+
+<iframe id="%Bind(:2)" src="%Bind(:1)" onload="resize()" scrolling="no" marginwidth="0" marginheight="0"+
frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:block"> </iframe>
+</html>+

Any idea on this?
Thanks for your time.
Regards,
Hari.A

Edited by: 923121 on Dec 5, 2012 9:28 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 16 2013
Added on Dec 6 2012
1 comment
89 views