Thanks for the info on this subject. They have been a big help. 

One of the problems with textareas is in printing the rest of the text 
beyond the scrolled view (when you have more text than is visible in the 
textarea). However, it will work in IE with a print style of 
{overflow:visible} - but will not work in Firefox.

Don't want to dive too much into CSS in this group. Was just hoping there 
was (or in the future?) an attribute for the struts form tag that would 
automatically print the form values as text instead of printing the values 
inside form elements (inputs/textareas) using the existing struts form code.

In the meantime, I can live with handling most of it with stylesheets or 
wrapping an "if" statement around each form element and display according to 
a querystring parameter.

Thanks for all the tips!
Jeff

---------- Forwarded message ----------
From: "Frank W. Zammetti" <[EMAIL PROTECTED]>
To: "Frank W. Zammetti" <[EMAIL PROTECTED]>
Date: Wed, 14 Sep 2005 13:39:02 -0400 (EDT)
Subject: Re: Printer Friendly Struts Form
Even better, use display:none; on the checkboxes and radios so everything
lines up right. Updated:

<html>
<head>
<title>Test</title>
<style>
.cssNoBorder {
border : 0 solid #ffffff;
overflow : hidden;
background-color : #ffffff;
}
</style>
</head>
<body style="background-color;#ffffff;">
<table border="0" cellpadding="4" cellspacing="4">
<tr valign="top">
<td>Button:</td>
<td><input type="button" class="cssNoBorder" value="SomeValue"></td>
</tr>
<tr valign="top">
<td>Text:</td>
<td><input type="text" class="cssNoBorder" value="SomeValue"></td>
</tr>
<tr valign="top">
<td>Select:</td>
<td><select class="cssNoBorder"><option>1</option></select></td>
</tr>
<tr valign="top">
<td>Textarea:</td>
<td><textarea class="cssNoBorder">SomeValue</textarea></td>
</tr>
<tr valign="top">
<td>Checkbox:</td>
<td><input type="checkbox" class="cssNoBorder"
style="display:none;">&nbsp;SomeValue</checkbox></td>
</tr>
<tr valign="top">
<td>Radio:</td>
<td><input type="radio" class="cssNoBorder"
style="display:none;">&nbsp;SomeValue</checkbox></td>
</tr>
<tr valign="top">
<td>File:</td>
<td><input type="file" class="cssNoBorder" value="SomeValue"></td>
</tr>
<tr valign="top">
<td>Password:</td>
<td><input type="password" class="cssNoBorder" value="SomeValue"></td>
</tr>
<tr valign="top">
<td>Reset:</td>
<td><input type="reset" class="cssNoBorder" value="SomeValue"></td>
</tr>
<tr valign="top">
<td>Submit:</td>
<td><input type="submit" class="cssNoBorder" value="SomeValue"></td>
</tr>
</table>
</body>
</html>

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

Reply via email to