Solved

Printing in Kiosk Mode/Frames

Posted on 1998-06-25
3
322 Views
Last Modified: 2012-05-04
Hi, I'd like to implement a Print button on my web page - thus removing the need to give the user access to the menu options (running in kiosk mode).

Can this be done (e.g. in Javascript)?  A complication may be that the data to print will be in a different frame to the print button, so there may be an issue with which frame has focus when the button is pressed.

Regards, Maddy.
0
Comment
Question by:maddy051398
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 5

Expert Comment

by:julio011597
ID: 1820866
parent.frameToPrint.print()

which surely works in NN4.

-julio
0
 

Author Comment

by:maddy051398
ID: 1820867
I tried the following (not worrying about frames) which works in NN4 but not IE4:

<INPUT TYPE="reset" NAME="button1" VALUE="Print" onClick = "PrintMe()">
<SCRIPT LANGUAGE="JAVASCRIPT">
function PrintMe()
{
   parent.print ()
}
</SCRIPT>

Any suggestions?  I've looked in a couple of IE4 and Javascript books and can't find any reference to a print method.  In IE4 I get the 'Object doesn't support this property or method' script error when I press the button.

Regards, Maddy
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 50 total points
ID: 1820868
This one should work in MSIE and Netscape 4

<object id=WBControl width=0 height=0 classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2></object>
<SCRIPT LANGUAGE=VBScript><!-- //
   Sub VBPrint() On Error Resume Next
      WBControl.ExecWB 6,1
   End Sub
// --></SCRIPT>

<SCRIPT LANGUAGE=JavaScript><!-- //
if (navigator.appName.indexOf('Microsoft') !=-1)
   document.write('<FORM><INPUT TYPE="BUTTON" ONCLICK="VBPrint()" value="Print"></FORM>');
else if (self.print)
   document.write('<FORM><INPUT TYPE="BUTTON" ONCLICK="self.print()" value="Print"></FORM>');
// --></SCRIPT>

this will print the page it is on. Other-frame printing will need the onclick(s) to execute a function in the frameset head, passing the name or number of the frame to print

Enjoy,

Michel
0

Featured Post

Enroll in July's Course of the Month

July's Course of the Month is now available! Enroll to learn HTML5 and prepare for certification. It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

#Citrix #Internet Explorer #Enterprise Mode #IE 11 #IE 8
Today, still in the boom of Apple, PC's and products, nearly 50% of the computer users use Windows as graphical operating systems. If you are among those users who love windows, but are grappling to keep the system's hard drive optimized, then you s…
Google currently has a new report that is in beta and coming soon to Webmaster Tool accounts. This Micro Tutorial will highlight new features for Google Webmaster Tools.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

628 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question