By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,238 Members | 1,661 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,238 IT Pros & Developers. It's quick & easy.

Javascript to produce page break

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Jennie wrote:
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


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="#FFFFFF">
<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>
Jul 23 '05 #2

P: n/a
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:J0*******************@newssvr22.news.prodigy. com...
Jennie wrote:
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


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="#FFFFFF">
<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>

Jul 23 '05 #3

P: n/a
Jennie wrote:
someone e-mailed me this and it seems to work.
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> FMP-RECORD]
<TR class=page>
<A HREF="xxx">[FMP-FIELD: Title]</A>
</TR>
[/FMP-RECORD]


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.
Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.