Print page - but not button

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all

I have seen many post in this forumn about print buttons but they all create
a "button". Is there a way to print a form or open the printer box (there is
a form on the page) by OnClick of a sinlge cell table - the reason for this
is that tables just look neater. (sorry not really any good at frontpage)

I got this from Thomases post which works but it is still a rollover effect
button

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>

And if you want it to be a button, then you can use this -

<button onClick="print_page()">Print Page</button>


Any help on this would be greate thanks
 
It's OK I got it.

<td> <p align="center"><font face="Verdana" size="2"><a
href="javascript:print_page()"><span style="text-decoration: none;
font-weight: 700"><font color="#FFFFFF">Postal booking - paying by cheque or
card - Press here
print this form</font></span></a></font></td></tr></table><p>

Thanks anyway
 
Back
Top