Click here to Skip to main content
15,897,273 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello,
i use php to design website , but i faced problem in printing.
in one page i have button and text box , i want when i press on the button the text box disappear.
Posted
Comments
Maarten Kools 3-Feb-14 9:46am    
You can use CSS media queries to hide elements while printing.

1 solution

Based upon the somewhat scanty description:

If you're working on the client side when you click the button. Once you are at the client, the easiest control is via javaScript: give your textbox an ID and set it's visibility='hidden'; when your print event is through (or whenever it is appropriate), restore with visibility='visible';

If the printing is calling php on the server, you can capture the contents of the textbox in a session variable (for example) and then make it go away via AJAX. Then, you restore the textbox in any number of ways (even refreshing the page) and restore the text from the session variable.

It all depends upon what you are doing to print.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900