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

rintWindow()">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
|
|