If you are using Page Viewer WebPart with custom aspx page. You might have some problem with sid scroll bar. Your client doens't like duplicate scroll bars...
Here is solution.
It can be done with javascript:
function resizeMe() {
window.resizeTo(document.getElementById("yourPageBodyId").scrollWidth, document.getElementById("yourPageBodyId").scrollHeight);
}
Put this code your custom aspx page, (NOT page viewer webpart).
You might have some question, if you have collapsible panel or or some point your custom page has to be extended. You will have side scroll bar... How to remove it... You can remove it by using javascript.
For the collapsible, if you use collapsible panel with JQuery, you should have click event.
for example: JQuery Code
<script type="text/javascript" src="/_LAYOUTS/STYLES/JavaScript/jquery-1.6.1.js"></script>
<script type="text/javascript" src="/_LAYOUTS/STYLES/JavaScript/jquery.js"></script>
<script type="text/javascript">
function resizeMe() {
window.resizeTo(document.getElementById("yourPageBodyId").scrollWidth, document.getElementById("yourPageBodyId").scrollHeight);
}
$("#yourCollabsibleId").click(function() {
$(this).next("p").slideToggle("fast")
$(this).toggleClass("active");
$(this).siblings("h3").removeClass("active");
});
</script>
HTML Code:
<asp:Panel ID="panel" runat="server">
<div>
<h3 id="yourCollabsibleId">
<asp:Label ID="lblCollapsibleTitle" Text="Show" runat="server"></asp:Label>
</h3>
<p id="yourParagraphId">
<table style="width: 100%;">
<tr>
<td>
blah, blah, blah
</td>
</tr>
</table>
</p>
</div>
</asp:Panel>
If you click "<h3 id="yourCollabsibleId">" this, it will be expended. and you see side scroll bar...
put same code in clicked event as above:
window.resizeTo(document.getElementById("yourTagId").scrollWidth, document.getElementById("yourTagId").scrollHeight);
You also need to put number like +50 or +100
On clicked event like:
$("#yourCollabsibleId").click(function() {
window.resizeTo(document.getElementById("yourPageBodyId").scrollWidth, document.getElementById("yourPageBodyId").scrollHeight + 100);
$(this).next("p").slideToggle("fast")
$(this).toggleClass("active");
$(this).siblings("h3").removeClass("active");
});
or you might need to calculate your paragraph height using JQuery: $("#yourParagraphId").height();
Put this all together:
$("#yourCollabsibleId").click(function() {
window.resizeTo(document.getElementById("yourPageBodyId").scrollWidth + 30, document.getElementById("yourPageBodyId").scrollHeight + $("#yourParagraphId").height() + 80);
$(this).next("p").slideToggle("fast")
$(this).toggleClass("active");
$(this).siblings("h3").removeClass("active");
});
put this in your custom page on page viewer webpart, Now you can beat page viewer webpart in SharePoint!
Enjoy DDIBA~! 