跨域调用报表展现页面的flash打印方法
環(huán)境說明:
項目的應用和潤乾的報表應用分別部署在同一機器不同的web服務器上(IP相同,端口不同,項目的端口8080,報表應用的端口是6868)。
在項目中的父頁面通過iframe調用報表展現(xiàn)頁面。
在父頁面中調用潤乾中的flash打印的JS方法進行flash打印。
調用方式:
寫了個簡單的測試頁面parent.html,將其放到非報表應用中進行測試,在非報表應用中的parent.html中通過document.getElementById("myFrame").contentWindow.report1_flashPrint();調用報表的flash打印功能。
?
parent.html的代碼如下:
?
<html>
<head>
<script type="text/javascript">
function callChild(){
alert("flashPrint2");
document.getElementById("myFrame").contentWindow.report1_flashPrint();
}
</script>
</head>
<body>
<input id="button" type="button" value="調用報表應用中的flash打印函數(shù)" οnclick="callChild()"/>
<iframe id="myFrame" name="myFrame" src=">
</body>
</html>
?
?
轉載于:https://www.cnblogs.com/shiGuangShiYi/p/10117564.html
總結
以上是生活随笔為你收集整理的跨域调用报表展现页面的flash打印方法的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: springmvc自定义日期编辑器
- 下一篇: C#学习基本概念之匿名方法及Lambda