Print buttom

G

Gene McKinney

I would like to put a button at the end of a form so that
before they click on "Submit" they could print the from
out so they would have a copy for them selves.

Just a button that when you clicked it, it would print
what was on the screen.

Thanks.
 
M

Murray

All such methods will fail in IE5/Mac. I usually just do something like
this -

Put this in the head of the document -

<script type="text/javascript">
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
</script>

Put this in the body of the document -

<a href="javascript:print_page()">Print this</a>
 
G

Gene McKinney

I will give it a try. Thanks.

-----Original Message-----
All such methods will fail in IE5/Mac. I usually just do something like
this -

Put this in the head of the document -

<script type="text/javascript">
function print_page(where){
var is_mac=(navigator.platform.indexOf("ac") != -1);
(document.all && is_mac)?
alert("Select \"Print\" from the menu") : where? where.window.print() :
window.print();
}
</script>

Put this in the body of the document -

<a href="javascript:print_page()">Print this</a>



--
Murray




.
 
Top