Print page - but not button

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
 
G

Guest

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

Similar Threads

Print button with Frames 7
Browser Sniffers 4
print button 2
Print button 1
What calls the Print Button to print 1
Interactive Button for Printing 5
Show print link on screen only 1
Printing a page 3

Top