Print page - but not button

W

Wayne-I-M

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
 
W

Wayne-I-M

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top