How do i print asp page on client side "only the contents"

Reply

Join Date: Nov 2005
Posts: 3
Reputation: rjadhav is an unknown quantity at this point 
Solved Threads: 0
rjadhav rjadhav is offline Offline
Newbie Poster

How do i print asp page on client side "only the contents"

 
0
  #1
Nov 9th, 2005
How do i print asp page on client side ?
the code
<input type="button" value="Print" onClick="window.print()">
prints the entire asp page .if i want to print only the contents of the page and not the links and other stuff .How do i do it ?
Can I get a sample code for it .

Thank you
Reply With Quote Quick reply to this message  
Join Date: Sep 2004
Posts: 89
Reputation: msaqib is an unknown quantity at this point 
Solved Threads: 1
msaqib msaqib is offline Offline
Junior Poster in Training

Re: How do i print asp page on client side "only the contents"

 
0
  #2
Nov 10th, 2005
Wel they way I use to print the whole page is by using the javascript to hide the things i dont want to appear on the print.
I use this javascript to hide the things, I pass the id of that particular HTML element whom i want to hide like the table, images etc...
Then you can call the print method to print the page.
  1. function showhide(id)
  2. {
  3. var itm = null;
  4. if (document.getElementById) {
  5. itm = document.getElementById(id);
  6. } else if (document.all){
  7. itm = document.all[id];
  8. } else if (document.layers){
  9. itm = document.layers[id];
  10. }
  11. if (itm.style) {
  12. if (itm.style.display == "none") { itm.style.display = ""; }
  13. else { itm.style.display = "none"; }
  14. }
  15. }
Reply With Quote Quick reply to this message  
Join Date: Mar 2005
Posts: 131
Reputation: william_stam is an unknown quantity at this point 
Solved Threads: 2
william_stam's Avatar
william_stam william_stam is offline Offline
Junior Poster

Re: How do i print asp page on client side "only the contents"

 
0
  #3
Nov 15th, 2005
therwise just use the meta print thiny. it prints an entirely different page to the one showed. so set up 2 asp pages. 1 to be viewed, 1 to be printed
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 9352 | Replies: 2
Thread Tools Search this Thread



Tag cloud for ASP
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC