Wrox Programmer Forums
|
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 24th, 2004, 10:30 PM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default noprint buttons

Hi,

  I have a webpage with a report and a button to go back.
I dont want to print the button when i print the webpage.
How can i do this?

Any reply is highly appreciated.

 
Old August 24th, 2004, 11:30 PM
Authorized User
 
Join Date: Aug 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sinapra Send a message via MSN to sinapra Send a message via Yahoo to sinapra
Default

hi
Have you given any print option in the code itself? If the user has to use Ctrl+P option, then as far as I know, you may not be able to disable, but you can use Javascript that looks for the option chosen by user, i.e., if the user selects print option Ctrl+P, you can disable the button. Else, if you have written the coding for print option, you can directly write a condition where the code will check onClick event.
I hope you are clear with what I said.
Regards

sinapra
 
Old August 25th, 2004, 01:56 AM
Authorized User
 
Join Date: Aug 2004
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello sinapra,

   I didnt write any code to print. Just clicking the browser's print button. The button i need is to go back to the selection. I am generating payslips for 3 employees at a time.

I have given multiple option in the select control which has employee IDs(value) and names(text). Every time i am selecting 3 employees.
  Ofcourse! i can use browser back button to go back page. But the problem is, even though i select another 3 employees the pay slip displays only the last employees. Thats why i want to have a button to go back (location.href="payslipmain.asp"). then its ok. But when i print the button will also print. I dont want that...

thnx


 
Old August 25th, 2004, 02:52 AM
Authorized User
 
Join Date: Aug 2004
Posts: 60
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to sinapra Send a message via MSN to sinapra Send a message via Yahoo to sinapra
Default

Hi

Ok so now as soon as user clicks the browser print option you want to disable the back and other related buttons.
I am not sure how the button could be put off when user selects the print option from browser, instead, you can just provide another button say 'PRINT NOW' which would take the user to a new page with the preview of the page without buttons. And this page can be used to print.
Let me know if it helps--------

Regards

sinapra
 
Old August 25th, 2004, 03:08 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 363
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hello,

  I think the original post dont want to have another page without buttons. He said that he want to just to not print the button while printing the current page. I am not sure but i think this can be done using CSS2.


<head>
<style>
@media print{
 input.prncls {visibility:hidden;}
}
@media screen {
 input.prncls {border-style:solid;border-width:1;visibility:visible;}
}
</style>
</head>


<input type="button" value="Back" onclick="javascript:location.href='payslipmain.asp ';" class="prncls">


I think this helps.








Similar Threads
Thread Thread Starter Forum Replies Last Post
Buttons plb BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 August 12th, 2007 12:36 AM
buttons over and under rahzan Access VBA 4 April 7th, 2005 11:35 AM
2 Submit Buttons ... HOW? Benno Dreamweaver (all versions) 1 November 23rd, 2004 12:14 PM
'ok buttons' hiker Beginning VB 6 2 March 22nd, 2004 02:30 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.