printing parts of a page

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

printing parts of a page

Post by ol4pr0 »

Oke.. i would like to start making a button_click(); which will print only the values added to a form ( input type )


How would i start on this. tried looking in http://www.php.net however didnt really able to find me something.

example

Code: Select all

echo <<<input
<input type=text name=number1>input1</input>
<input type=text name=number1>input2</input>
input;
Now i would like to have input1 and input2 being printed on Paper.

HOw would i do such a thing?
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Does anybody have any idea on what i mean?

instead of printing a complete page

Code: Select all

<input type=button value="Print Page" onClick="print()">
i would only like to have it print the inputs of a form.

how would i do that? PHP/ java?
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

This is a client side problem as PHP really can't control any of this. You probably need to look into generating a print only CSS stylesheet.

Mac
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

I am currenlty looking around in Google however if you got some good links where i can look in to this.

i would be a happy person
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Thanks guess i got me some reading to do on CSS2 ;-)
Post Reply