Click here to Skip to main content
15,919,422 members
Please Sign up or sign in to vote.
3.67/5 (2 votes)
how i can
print values from text boxes in report using java-script

i want to print cash receive that must user enter its values
Name :
Address :
The Amount :
Products :
Price :

After the user enter his data or values , he must click print button then must see report form
to print it

thanks for advice

1 solution

For that you can use javascript function window.print().For more info check below mentioned links:

If you need to print an specific content, you can hide the rest (and format the printed area) by CSS:

<style media="screen">
  .noPrint{ display: block; }
  .yesPrint{ display: block !important; }
<style media="print">
  .noPrint{ display: none; }
  .yesPrint{ display: block !important; }

For more info : auto print using javascript

Window print() Method

jQuery Print DIV Content with CSS using jQuery Print Plugin in JavaScript
Share this answer
radals 28-Nov-13 6:48am    
thanks alot
Sampath Lokuge 28-Nov-13 6:50am    
You're warmly welcome :)

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