I have a form.
The form has input fields.
The user enters information onto the form presses submit, the information
goes to a database.
All is good.
Now, I want to change the form so that the user can print it.
When printing, the input fields are hidden using css and media='print'.
I'm trying to display the value of the input field so that it is invisible
when media != 'print' as follows
<input class='displayonly' type='text' id='f_agent' name='f_agent'
maxlength='35' />
<span class='pageonly'>
<script language='javascript'>Jot("f_agent");</script>
</span>
where
function Jot(what)
{
document.write(document.getElementById(what).value );
}
and the pageonly/displayonly class have been appropriately defined.
My hope was the entering a value in the input then using print|preview would
result in showing the value just entered would result in the value showing
in the field without the box associate with the input field. But, it
doesn't work.
Any ideas?
Thanks.
Greg