Solved

Only show field on print

Posted on 2000-05-16
3
161 Views
Last Modified: 2010-04-09
I would like to set some textfields on my checkout-page, wich only appear when the customer will print the page and otherwise are hidden. Any idea??
0
Comment
Question by:ColumA
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 1

Accepted Solution

by:
ManoloMA earned 50 total points
ID: 2813709
Try with:

<style MEDIA="screen">
      .text   { display:"none"; }
</style>


<input type="text" class="text">

0
 
LVL 22

Expert Comment

by:CJ_S
ID: 2814538
that'll only work with IE 5 though....not that I have an option out of the top of my head.
0
 
LVL 7

Expert Comment

by:nettrom
ID: 2814922
If I remember correctly a Netscape 4.x window is 0x0 pixels when it's printed, so you could do:

<script type="text/javascript">
if(document.layers && window.innerWidth == 0 && window.innerHeight == 0) {
document.write('<style type="text/css">.text { display: none; }</style>');
}
</script>

And stuff that in the HEAD element.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Find out what you should include to make the best professional email signature for your organization.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

622 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question