|
|
Re: dynamic height & width for birt:viewer in jsp [message #734396 is a reply to message #734260] |
Fri, 07 October 2011 15:58 |
|
If you want it to take up the full page why not just set the attribute
isHostPage to true?
If you have to do it in script use something like what is described here:
http://www.javascripter.net/faq/browserw.htm
//example
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<%@ taglib uri="/birt.tld" prefix="birt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<body onload=”resizeFrame(document)” bgcolor=”#cccccc”>
<script type=”text/javascript”>
// Firefox worked fine. Internet Explorer shows scrollbar because of
frameborder
function resizeFrame(f) {
var x = document.getElementsByTagName("iframe");
var winW = 630, winH = 460;
if (document.body && document.body.offsetWidth) {
winW = document.body.offsetWidth;
winH = document.body.offsetHeight;
}
if (document.compatMode=='CSS1Compat' &&
document.documentElement &&
document.documentElement.offsetWidth ) {
winW = document.documentElement.offsetWidth;
winH = document.documentElement.offsetHeight;
}
if (window.innerWidth && window.innerHeight) {
winW = window.innerWidth;
winH = window.innerHeight;
}
x[0].style.width = winW + "px";
x[0].style.height = winH + "px";
}
</script>
</head>
<body>
<birt:viewer id="birttViewer"
reportDesign="TopNPercent.rptdesign"
format="html"
scrolling="true"
height="700"
width="950"
pageNum="2"
frameborder="false"
showNavigationBar="false"
showToolBar="false"
pattern="run"
locale="fr_CA"
isHostPage="false">
</birt:viewer>
</body>
</html>
Jason
On 10/7/2011 6:05 AM, gaurikate wrote:
> plz reply
|
|
|
|
Powered by
FUDForum. Page generated in 0.04718 seconds