printer link in frontpage

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

Guest

Hello,
How can I add a link on my website so that users can print the page without
having to use the buttons of a browser?

thanks
 
ouistiti17 said:
Hello,
How can I add a link on my website so that users can print the page
without
having to use the buttons of a browser?

IMHO, it's not necessary. I have applications that are printed by
visitors every day. There is a note at the top of each one that says
if they have a problem printing to let me know. I've had 1, a Webtv'er
w/o a printer!!

Tom J
 
HI Makr,

I looked at the script at javascript.internet.com and it basically says:
function printWindow() { if (parseInt(navigator.appVersion) >= 4)
window.print() }
which is called like this
<a href="javascript:printWindow()">Print This Page</a>

What does this test do ?
Is it only true of IE 4+?
Is it true for other browsers, say Firefox or Netscape ?

I had obtained some script from another website or it may have been from
this NG:
function print_page(where)
{
document.all && (navigator.platform.indexOf("ac") != -1)
? alert("Select \"Print\" from the menu")
: where
? where.top.frames['index_main'].print()
: top.frames['index_main'].print()
}
which is called like this
<input type="button" value="Print Window"
onClick="parent.index_main.focus();print_page()">

This is set up the way it is because the windows I want to print are in a
frame named "index_main".
I am not sure why I need to focus on index_main before I call the fucntion
to print it

Does print_page() do a better job than printWindow() , or much the same?

--
Cheers,
Trevor L., WIP (Web Interested Person)
Website: http://tandcl.homemail.com.au

Mark said:
You need to use a JavaScript for this. Try the one located here:
http://javascript.internet.com/page-details/window-print.html

If this one doesn't work, look at other JavaScript repositories such
as www.dynamicdrive.com

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
The 1st one will print the page (frame) currently selected (clicked on by user) for all level 4+ browsers, but not handle Mac users
The second one will print a specific frame even if clicked in another frame
- plus handle Mac users w/ an alert telling them what to do

--




| HI Makr,
|
| I looked at the script at javascript.internet.com and it basically says:
| function printWindow() { if (parseInt(navigator.appVersion) >= 4)
| window.print() }
| which is called like this
| <a href="javascript:printWindow()">Print This Page</a>
|
| What does this test do ?
| Is it only true of IE 4+?
| Is it true for other browsers, say Firefox or Netscape ?
|
| I had obtained some script from another website or it may have been from
| this NG:
| function print_page(where)
| {
| document.all && (navigator.platform.indexOf("ac") != -1)
| ? alert("Select \"Print\" from the menu")
| : where
| ? where.top.frames['index_main'].print()
| : top.frames['index_main'].print()
| }
| which is called like this
| <input type="button" value="Print Window"
| onClick="parent.index_main.focus();print_page()">
|
| This is set up the way it is because the windows I want to print are in a
| frame named "index_main".
| I am not sure why I need to focus on index_main before I call the fucntion
| to print it
|
| Does print_page() do a better job than printWindow() , or much the same?
|
| --
| Cheers,
| Trevor L., WIP (Web Interested Person)
| Website: http://tandcl.homemail.com.au
|
| Mark Fitzpatrick wrote:
| > You need to use a JavaScript for this. Try the one located here:
| > http://javascript.internet.com/page-details/window-print.html
| >
| > If this one doesn't work, look at other JavaScript repositories such
| > as www.dynamicdrive.com
| >
| > Hope this helps,
| > Mark Fitzpatrick
| > Microsoft MVP - FrontPage
| >
| > | >> Hello,
| >> How can I add a link on my website so that users can print the page
| >> without
| >> having to use the buttons of a browser?
| >>
| >> thanks
|
|
| I choose Polesoft Lockspam to fight spam, and you?
| http://www.polesoft.com/refer.html
|
|
 
SBR,
Thank you.

I am wondering whether a compromise would be better

function print_page()
{ window.print
? top.frames['index_main'].print()
: alert("Select \"Print\" from the menu")
}

But I still wonder why the code
onClick="parent.index_main.focus();print_page()">

That is, why the need to focus if the function specifies the frame to print?

--
Cheers,
Trevor L., WIP (Web Interested Person)
Website: http://tandcl.homemail.com.au
The 1st one will print the page (frame) currently selected (clicked
on by user) for all level 4+ browsers, but not handle Mac users The
second one will print a specific frame even if clicked in another
frame - plus handle Mac users w/ an alert telling them what to do

--




Trevor L. said:
HI Makr,

I looked at the script at javascript.internet.com and it basically
says: function printWindow() { if (parseInt(navigator.appVersion) >=
4) window.print() }
which is called like this
<a href="javascript:printWindow()">Print This Page</a>

What does this test do ?
Is it only true of IE 4+?
Is it true for other browsers, say Firefox or Netscape ?

I had obtained some script from another website or it may have been
from this NG:
function print_page(where)
{
document.all && (navigator.platform.indexOf("ac") != -1)
? alert("Select \"Print\" from the menu")
: where
? where.top.frames['index_main'].print()
: top.frames['index_main'].print()
}
which is called like this
<input type="button" value="Print Window"
onClick="parent.index_main.focus();print_page()">

This is set up the way it is because the windows I want to print are
in a frame named "index_main".
I am not sure why I need to focus on index_main before I call the
fucntion to print it

Does print_page() do a better job than printWindow() , or much the
same?

--
Cheers,
Trevor L., WIP (Web Interested Person)
Website: http://tandcl.homemail.com.au

Mark said:
You need to use a JavaScript for this. Try the one located here:
http://javascript.internet.com/page-details/window-print.html

If this one doesn't work, look at other JavaScript repositories such
as www.dynamicdrive.com

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage

Hello,
How can I add a link on my website so that users can print the page
without
having to use the buttons of a browser?

thanks


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
focus makes that frame the active selected frame to print

--




| SBR,
| Thank you.
|
| I am wondering whether a compromise would be better
|
| function print_page()
| { window.print
| ? top.frames['index_main'].print()
| : alert("Select \"Print\" from the menu")
| }
|
| But I still wonder why the code
| onClick="parent.index_main.focus();print_page()">
|
| That is, why the need to focus if the function specifies the frame to print?
|
| --
| Cheers,
| Trevor L., WIP (Web Interested Person)
| Website: http://tandcl.homemail.com.au
|
| Stefan B Rusynko wrote:
| > The 1st one will print the page (frame) currently selected (clicked
| > on by user) for all level 4+ browsers, but not handle Mac users The
| > second one will print a specific frame even if clicked in another
| > frame - plus handle Mac users w/ an alert telling them what to do
| >
| > --
| >
| > _____________________________________________
| > SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
| > "Warning - Using the F1 Key will not break anything!" (-;
| > To find the best Newsgroup for FrontPage support see:
| > http://www.net-sites.com/sitebuilder/newsgroups.asp
| > _____________________________________________
| >
| >
| > | >> HI Makr,
| >>
| >> I looked at the script at javascript.internet.com and it basically
| >> says: function printWindow() { if (parseInt(navigator.appVersion) >=
| >> 4) window.print() }
| >> which is called like this
| >> <a href="javascript:printWindow()">Print This Page</a>
| >>
| >> What does this test do ?
| >> Is it only true of IE 4+?
| >> Is it true for other browsers, say Firefox or Netscape ?
| >>
| >> I had obtained some script from another website or it may have been
| >> from this NG:
| >> function print_page(where)
| >> {
| >> document.all && (navigator.platform.indexOf("ac") != -1)
| >> ? alert("Select \"Print\" from the menu")
| >> : where
| >> ? where.top.frames['index_main'].print()
| >> : top.frames['index_main'].print()
| >> }
| >> which is called like this
| >> <input type="button" value="Print Window"
| >> onClick="parent.index_main.focus();print_page()">
| >>
| >> This is set up the way it is because the windows I want to print are
| >> in a frame named "index_main".
| >> I am not sure why I need to focus on index_main before I call the
| >> fucntion to print it
| >>
| >> Does print_page() do a better job than printWindow() , or much the
| >> same?
| >>
| >> --
| >> Cheers,
| >> Trevor L., WIP (Web Interested Person)
| >> Website: http://tandcl.homemail.com.au
| >>
| >> Mark Fitzpatrick wrote:
| >>> You need to use a JavaScript for this. Try the one located here:
| >>> http://javascript.internet.com/page-details/window-print.html
| >>>
| >>> If this one doesn't work, look at other JavaScript repositories such
| >>> as www.dynamicdrive.com
| >>>
| >>> Hope this helps,
| >>> Mark Fitzpatrick
| >>> Microsoft MVP - FrontPage
| >>>
| >>> | >>>> Hello,
| >>>> How can I add a link on my website so that users can print the page
| >>>> without
| >>>> having to use the buttons of a browser?
| >>>>
| >>>> thanks
| >>
| >>
| >> I choose Polesoft Lockspam to fight spam, and you?
| >> http://www.polesoft.com/refer.html
|
|
 
Back
Top