473,387 Members | 1,757 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Print page

how can i disable the print preview of page during printing
Dec 23 '11 #1
3 1459
Rabbit
12,516 Expert Mod 8TB
In a web browser? You can't. Or rather, the only way to do it would be through client-side scripting and that can be disabled so that the code doesn't run. But why would you even need to disable print preview?
Dec 23 '11 #2
By using CSS you can able to achieve in print preview blank page.
Expand|Select|Wrap|Line Numbers
  1. <style type="text/css" media="print">
  2. body 
  3. { display: none;} 
  4. </style>
  5.  
In above css code as we are using media="print" this will execute when we print the page only.
Dec 26 '11 #3
Rabbit
12,516 Expert Mod 8TB
Just be aware that not all versions of web browsers will support that.
Dec 26 '11 #4

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

Similar topics

1
by: Christian H | last post by:
Hello! I'm trying to create and extract the values of a Print-Range , "Print page" dialog. I have a textfield where the user can enter the pages they whish to print. The format can be:...
3
by: hartbypass | last post by:
I am looking for some code to duplicate something like on http://www.charmeck.org/Site-Info/Home.htm when someone prints the Print This Page link. This site is using MSCMS so it might be using...
7
by: Robert Adkison | last post by:
I need to print a web page. It is my preference that my users just do a File/Print from explorer. That way my users will get the print dialog that will allow them to select the fax printer. The...
5
by: carlor | last post by:
Hi there, I have a print-only page that the user goes to in order to print their document. The problem I have is that I need to have some sort of return button/link but I don't want it to print...
5
by: Erik | last post by:
My main web page has a print button, and when pushed a new page should load, be printed automatically, and then the page should be closed. The control should be back at the main page and the user...
4
by: Peter | last post by:
ASP.NET 1.1 Does anyone has an example where user can click on an link or button and print the current page? Thanks Peter
2
by: nikou_70 | last post by:
I write a page in HTML ,user can print it I want to fix page size in print page set up to (legal) that doesn't need user every time change option how I can do this.
1
by: jyothiB | last post by:
Hi I have a datagrid in a webform that has to be printed. So i enclosed it in DIV tags and wrote it to a new html page, and the grid looks fine for printing but the grid spans more than 1 print...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
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,...
0
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...

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.