<table>
<tr >
<td >
<iframe id="ifrm1" runat="server" scrolling="auto" width="100%"></iframe>
</td>
</tr>
</table>
Script :-
<script type="text/javascript" language="javascript">
function ResizeReport() {
var rep = document.getElementById("<%= ifrm1.ClientID %>");
var htmlheight = document.documentElement.clientHeight;
var htmlwidth = document.documentElement.clientWidth;
rep.style.height = (htmlheight - 140) + "px";
rep.style.width = (htmlwidth - 100) + "px";
window.alert(rep.style.height);
window.alert(htmlheight);
}
ResizeReport();
window.onresize = function Resize() { ResizeReport() };
</script>
in asp.net page in Page_load event, we have to write in below way.
ifrm1.Attributes.Add("onload", "ResizeReport();");
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment