473,698 Members | 2,972 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 1804
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
1788
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
5583
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
1746
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
130261
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
4603
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
4068
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
1952
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
1529
by: esateesh | last post by:
how to make a print button invisible in the printed page when a print is given
0
8683
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
9170
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...
0
9031
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8904
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
8876
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...
1
6531
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5867
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3052
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
2341
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.