SitePoint Sponsor

User Tag List

Results 1 to 5 of 5

Thread: Page Breaks

  1. #1
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    India
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Page Breaks

    I have a very long list which is to be Printed. I want "n" number of records to come on a single page, after which the printing should move to the next page and so on.

    Is this possible in HTML thru Javascript?

  2. #2
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You'll want the CSS property page-break-before or page-break-after. Where you use it, however, is up to you. Are you wanting JS to insert a node with this style every n records?
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  3. #3
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    India
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Can you provide an example for the CSS property?

    Actaully I have over throusand records which are to be printed. And I want only 24 records to be printed on a single page.

    I think I will insert the CSS line after every 24 records.

  4. #4
    SitePoint Enthusiast
    Join Date
    Jun 2003
    Location
    India
    Posts
    80
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    See, for example If i need to print 5 records per page, what should I do?

    <tr bgcolor='white'><td>test2</td><td>o79gbidt</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test3</td><td>tczzffho</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test4</td><td>ncvym1uh</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test5</td><td>rr7rpr1b</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test6</td><td>57unz0fq</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test7</td><td>3ufvlla9</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test8</td><td>sy9xobi9</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test9</td><td>1or2bxzb</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test10</td><td>0ud4mtua</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test11</td><td>lhvs3k4m</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test12</td><td>0wl8qn3e</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test13</td><td>ouu4k2es</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test14</td><td>4gqxdpyh</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test15</td><td>wqk8mo6a</td><td>30</td><td>10</td><td>10</td></tr>
    <tr bgcolor='white'><td>test16</td><td>1j6xgt1a</td><td>30</td><td>10</td><td>10</td></tr>

  5. #5
    SitePoint Member
    Join Date
    Jun 2004
    Location
    Pretoria
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi,

    I'm sitting with a similar problem than amitabh !!

    I was wondering if you got this solved, If so, would you please be so kind to show it ????

    Many thanks !!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •