views:

933

answers:

2

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 complete 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="${command.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?

+3  A: 

Apparently it is a Firefox bug that can be worked around by altering the CSS:

http://jafferhaider.wordpress.com/2007/12/29/fix-for-the-firefoxcss-one-page-printing-bug/

JeffP
"You need to unfloat all floated elements in your CSS for print media" - Yow, +1 for you but -1 for Mozilla.
RichieHindle
A: 

ooohhh man this bug is really bugging me, i tried to remove all the float but it still only prints the first page :(