Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Only show field on print

Posted on 2000-05-16
3
Medium Priority
?
163 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 150 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …

688 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