473,748 Members | 5,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to make a print control invisible in a printed page if window.print() is used

6 New Member
HI,i used javascript:wind ow.print() in my application for print, but when the print is given am gettng that print button on the printed page. how to make that print button invisible
Mar 26 '07 #1
1 1806
Frinavale
9,735 Recognized Expert Moderator Expert
HI,i used javascript:wind ow.print() in my application for print, but when the print is given am gettng that print button on the printed page. how to make that print button invisible
Have you tried something like:
javascript:oncl ick: window.print(); btn_print.visib le='false';
?

This will make the print button invisible but this also means that the user will never be able to click it again....

If your button does a post back to your server, the page will be refreshed and the button will become visible again, so you'd have to suppress any postback actions that the button may do.

Is this a .NET question or a JavaScript question?

-Frinny
Mar 26 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

4
1791
by: q2005 | last post by:
Hi, All Is that posible to start to print atraight away without the window's "print" prompt when I do window.print()? Thank you! Jack
2
5585
by: Pudlik, Szymon | last post by:
Hi, I have page with left banner (links), footer and header and of cours with some images and text. I want to print this page but without banner, header and footer. Only images and text. Is it possible to do that? window.print() is printing all informations on page but I want only some part of it. Any ideas? Greetings, Szymon Pudlik.
2
1749
by: msnews.microsoft.com | last post by:
It appears myButton_OnClick is triggering in my user control AFTER its parent's Page_Load already runs. Is there a way to make the parent Page_Load to run afterwards? I'm changing a session variable when a user clicks on a button in a user control. The parent page reads in the session variable. Obviously, this isn't going to work if the parent has already done its thing. I'm looking for an alternative, but adding code to every page...
22
130345
by: stephen | last post by:
I have created an order form that users javascript to create a new html document when the customers clicks the "print page" button. Once the new document has been created it then prints the document and closes it with the following code: <body onload="window.print(); window.close();"> This works correctly (or at least the way I expect it to work under MS Internet Explorer, but it cuases Netscape to "crash"
3
4608
by: dave | last post by:
I have a long data entry web page that requires the user to scroll down for further data entry boxes. There is a "Save changes" button towards the top of the screen which disappears as the user scrolls down the page. Rather than place duplicate "Save changes" buttons at regular points down the page I would like to have a single button that moves down the page as the user scrolls down, maintaining its position on the page. Is it possible...
8
4072
by: makunag | last post by:
Didn't get answer with google and in my regular forum. Came across this site and posting here. Your help will be highly appreciated ! Our application have frames - MainNav, TaskNave and Content. When print button is clicked, it prints only the Content (obviously top.Content.focus() is in the code before window.print()). We were using windows 2000 & IE6 for years. Recently, our installation updated users machines with XP SP2. Now when print...
1
1955
by: Prasoon | last post by:
I have a JSP page on which when print is pressed - Records are fetched on a redirected page and those are to be printed. I use the lines - <script language="javascript"> window.print(); history.back(); </script> to do the same. When browsed from Netscape 4.7, the Resultset page is printed
1
1533
by: esateesh | last post by:
how to make a print button invisible in the printed page when a print is given
0
8987
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8826
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9534
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9316
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3303
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.