admin管理员组文章数量:1312952
I am having a JSP page, where i am dynamically creating a Table data. ( My page is having only table, and nothing else ).
Number of rows in table can go upto 1000s.
What i am doing is: after the plete page i have written
<script>
function printPage(){
window.print();
}
</script>
This code is working fine to print all pages in IE. but when the same code is run in Firefox it prints only first page. What could be the possible reason?
Initially i thought this might be related to page breaks in page then i used this too
<core:forEach var="result" items="${mand.resultsList}" varStatus="counter">
<core:if test="${(counter.index + 1)%40 eq 0}">
<tr class="breakMe"></tr>
</core:if>
<tr>
code here
</tr>
</core:forEach>
This way the table is broken into chunks of 40 rows, now in IE every page is having 40 rows ,while in FF still it is printing first page with 40 rows. What could be the possible solution?
I am having a JSP page, where i am dynamically creating a Table data. ( My page is having only table, and nothing else ).
Number of rows in table can go upto 1000s.
What i am doing is: after the plete page i have written
<script>
function printPage(){
window.print();
}
</script>
This code is working fine to print all pages in IE. but when the same code is run in Firefox it prints only first page. What could be the possible reason?
Initially i thought this might be related to page breaks in page then i used this too
<core:forEach var="result" items="${mand.resultsList}" varStatus="counter">
<core:if test="${(counter.index + 1)%40 eq 0}">
<tr class="breakMe"></tr>
</core:if>
<tr>
code here
</tr>
</core:forEach>
This way the table is broken into chunks of 40 rows, now in IE every page is having 40 rows ,while in FF still it is printing first page with 40 rows. What could be the possible solution?
Share Improve this question asked Jul 3, 2009 at 11:58 Rakesh JuyalRakesh Juyal 36.8k74 gold badges178 silver badges216 bronze badges1 Answer
Reset to default 6Apparently it is a Firefox bug that can be worked around by altering the CSS:
http://jafferhaider.wordpress./2007/12/29/fix-for-the-firefoxcss-one-page-printing-bug/
本文标签: javascriptWhy windowprint is printing all pages in IE but only one page in firefoxStack Overflow
版权声明:本文标题:javascript - Why window.print is printing all pages in IE but only one page in firefox? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741906115a2404155.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论