Print forms

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
Z3r0Tol3ranc3
Forum Newbie
Posts: 7
Joined: Mon Jul 01, 2002 11:44 am

Print forms

Post by Z3r0Tol3ranc3 »

does anyone knows the code 2 print a form content with multiple forms on 1 page and all sepperate printable
gnu2php
Forum Contributor
Posts: 122
Joined: Thu Jul 11, 2002 2:53 am

Post by gnu2php »

I don't quite understand the question. Are you trying to have multiple forms (such as <form action="...">...</form>) on a page, but have them share the same input fields?

Or are you wondering how to get the contents of multiple forms by using the $_POST variable? Note that you can only get the input of one form, since only one form can be submitted at a time.
Z3r0Tol3ranc3
Forum Newbie
Posts: 7
Joined: Mon Jul 01, 2002 11:44 am

Post by Z3r0Tol3ranc3 »

no, i want to PRINT it with my printer, a button witch gives command for printing the form
User avatar
hob_goblin
Forum Regular
Posts: 978
Joined: Sun Apr 28, 2002 9:53 pm
Contact:

Post by hob_goblin »

he wants multiple inputs to be printed seperately.. ie input #1 is on one page.. input #2 is on the next, etc..

buddy, this a php forum.. php can't do that. thats a browser thing.. you could try doing it in javascript
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

CSS2 can be used to force page-breaks using the page-break-before or page-break-after properties. However, I doubt if this is supported by any but the latest browsers.

Mac
gnu2php
Forum Contributor
Posts: 122
Joined: Thu Jul 11, 2002 2:53 am

Post by gnu2php »

JavaScript code for printing:

Code: Select all

<input type="button" onClick="window.print()" value="Print">
Z3r0Tol3ranc3
Forum Newbie
Posts: 7
Joined: Mon Jul 01, 2002 11:44 am

Post by Z3r0Tol3ranc3 »

thx, i'll try it out
Post Reply