I would like the front page page to print when someone clicks on the print
page command button - how do i do that?

Re: how do you create a print page command by Kevin

Kevin
Fri Oct 28 05:34:17 CDT 2005

JavaScript. Example:

<input type="button" name="B1" value="Print" onclick="window.print();">

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.

"Dean Paulson" <Dean Paulson@discussions.microsoft.com> wrote in message
news:7E6D78C2-1A31-4732-9389-3C2BF9E48880@microsoft.com...
>I would like the front page page to print when someone clicks on the print
> page command button - how do i do that?



Re: how do you create a print page command by Murray

Murray
Fri Oct 28 07:30:45 CDT 2005

That fails on IE5/Mac. And it will fail to appear in any modern browser
unless it is enclosed in <form> tags.

I usually do this -

<button value="Print this" onClick="alert('Please use File | Print on your
browser's menu')>Print this</button>

But seriously, here's about the best you can do -

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();
}

function writeOutPrintLink(){
document.getElementById('printLink').innerHTML = '<a
href="javascript:print_page();">Print this</a>'

}

</script>

Adjust the body tag of the document as follows -

<body ... onload="writeOutPrintLink();"> (where the ellipsis indicates
already existing attributes, if any)
<span id="printLink"></span>

That way, the link only shows up if you have javascript enabled.

--
Murray
============

"Kevin Spencer" <kevin@DIESPAMMERSDIEtakempis.com> wrote in message
news:%23n%23sos62FHA.3036@TK2MSFTNGP15.phx.gbl...
> JavaScript. Example:
>
> <input type="button" name="B1" value="Print" onclick="window.print();">
>
> --
> HTH,
>
> Kevin Spencer
> Microsoft MVP
> .Net Developer
> A watched clock never boils.
>
> "Dean Paulson" <Dean Paulson@discussions.microsoft.com> wrote in message
> news:7E6D78C2-1A31-4732-9389-3C2BF9E48880@microsoft.com...
>>I would like the front page page to print when someone clicks on the
>>print
>> page command button - how do i do that?
>
>



Re: how do you create a print page command by p

p
Fri Oct 28 22:59:52 CDT 2005

What's wrong with the Print icon on the toolbar or the Print on the File
dropdown?

Dean Paulson wrote:
> I would like the front page page to print when someone clicks on the print
> page command button - how do i do that?

Re: how do you create a print page command by Tom

Tom
Sat Oct 29 07:05:20 CDT 2005


Print This Page, Courtesy of Murray:

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>
--
===
Tom "Pepper" Willett
Microsoft MVP - FrontPage
---
FrontPage Support:
http://www.frontpagemvps.com/

About FrontPage 2003:
http://office.microsoft.com/home/office.aspx?assetid=FX01085802
===
"p c" <nospam@nospam.com> wrote in message
news:Dpydncn2EtUlbv_eRVn-qw@comcast.com...
| What's wrong with the Print icon on the toolbar or the Print on the File
| dropdown?
|
| Dean Paulson wrote:
| > I would like the front page page to print when someone clicks on the
print
| > page command button - how do i do that?