Solved

Printing in Kiosk Mode/Frames

Posted on 1998-06-25
3
320 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

It's here again; Microsoft is launching a new version of Internet Explorer: Internet Explorer 9, with noticeable changes on its interface, functions and new tools. As they say on its promotional video: "It's time to play, on a more beautiful web", f…
I had to do a bit of research to find the answer to this question so I thought I'd share my results.  Due to our outdated mainframe systems, we need to downgrade IE9 to IE8 in order to stay compatible.  We also needed to downgrade Java.  In order to…
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.
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.

749 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