Javascript to produce page break

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jennie

    #1

    Javascript to produce page break

    I am looking for a way to make the web page have a formfeed so the info from
    that spot will go to the top of the next printed page when I file>print the
    web page. I want it not to break on the screen but when I print the page.

    Is there such a JavaScript?

    TY


  • pcx99

    #2
    Re: Javascript to produce page break

    Jennie wrote:[color=blue]
    > I am looking for a way to make the web page have a formfeed so the info from
    > that spot will go to the top of the next printed page when I file>print the
    > web page. I want it not to break on the screen but when I print the page.
    >
    > Is there such a JavaScript?
    >
    > TY
    >
    >[/color]

    From: http://www.codeave.com/css/code.asp?u_log=4016

    One of the shortcomings of browser display is that the document rendered
    by the browser doesn’t usually print as well as it looks on screen
    especially when it comes to determining where a printed page should
    begin and end. CSS has a page break command that will accept two values
    before:always and after:always. You can specify that when printed which
    and how many pages will be printed from your one page displayed in the
    browser. The following example while very basic demonstrates both before
    and after rendering three printed pages from one browser page. If you
    use IE5.5 or better you should be able to print preview without having
    to actually print the documents.

    <html>
    <head>
    <title>CodeAve. com/CSS - Page Break</title>
    <body bgcolor="#FFFFF F">
    <center>
    Page 1
    <br style="page-break-before:always;" >
    Page 2
    <br style="page-break-after:always;">
    Page 3
    <p>
    Use print preview on your browser to see how<br>
    this page would print out to three pages
    </center>
    </body>
    </html>

    Comment

    • Jennie

      #3
      Re: Javascript to produce page break

      someone e-mailed me this and it seems to work.

      <head>

      <STYLE>
      tr.page {page-break-after: always}
      </STYLE>

      </head>

      <body>

      FMP-RECORD]
      <TR class=page>
      <A HREF="xxx">[FMP-FIELD: Title]</A>
      </TR>
      [/FMP-RECORD]

      </body>






      "pcx99" <x@x.com> wrote in message
      news:J0ioc.2653 4$Gi7.22339@new ssvr22.news.pro digy.com...[color=blue]
      > Jennie wrote:[color=green]
      > > I am looking for a way to make the web page have a formfeed so the info[/color][/color]
      from[color=blue][color=green]
      > > that spot will go to the top of the next printed page when I file>print[/color][/color]
      the[color=blue][color=green]
      > > web page. I want it not to break on the screen but when I print the[/color][/color]
      page.[color=blue][color=green]
      > >
      > > Is there such a JavaScript?
      > >
      > > TY
      > >
      > >[/color]
      >
      > From: http://www.codeave.com/css/code.asp?u_log=4016
      >
      > One of the shortcomings of browser display is that the document rendered
      > by the browser doesn’t usually print as well as it looks on screen
      > especially when it comes to determining where a printed page should
      > begin and end. CSS has a page break command that will accept two values
      > before:always and after:always. You can specify that when printed which
      > and how many pages will be printed from your one page displayed in the
      > browser. The following example while very basic demonstrates both before
      > and after rendering three printed pages from one browser page. If you
      > use IE5.5 or better you should be able to print preview without having
      > to actually print the documents.
      >
      > <html>
      > <head>
      > <title>CodeAve. com/CSS - Page Break</title>
      > <body bgcolor="#FFFFF F">
      > <center>
      > Page 1
      > <br style="page-break-before:always;" >
      > Page 2
      > <br style="page-break-after:always;">
      > Page 3
      > <p>
      > Use print preview on your browser to see how<br>
      > this page would print out to three pages
      > </center>
      > </body>
      > </html>[/color]


      Comment

      • Richard Cornford

        #4
        Re: Javascript to produce page break

        Jennie wrote:[color=blue]
        > someone e-mailed me this and it seems to work.[/color]

        As such an e-mail must be from someone who read your message on the
        group (through maybe indirectly through a web interface of some sort)
        you have to wonder why they did not post their reply to the group. In
        this case it could have been because the subject is strictly CSS and so
        is OT in a javascript group. But it may have been because they did not
        want their code publicly scrutinised.

        <snip>[color=blue]
        > FMP-RECORD]
        > <TR class=page>
        > <A HREF="xxx">[FMP-FIELD: Title]</A>
        > </TR>
        > [/FMP-RECORD][/color]

        In the HTML DTDs the opening DT/DH tag is not optional.

        <snip - needles verbatim quote, under top-post>

        See the FAQ.

        <URL: http://jibbering.com/faq/ >

        Richard.


        Comment

        Working...