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
Solved

Printing in Kiosk Mode/Frames

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

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

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

Suggested Solutions

I spend far too much time on the web keeping up with the news: politics, the environment, computer stuff, the Experts Exchange. It's never-ending. But many of the most informative web pages are overwhelmed with noise: scrolling banners, flashing tex…
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…
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.
How to create a custom search shortcut to site-search Experts Exchange using Google in the Firefox browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch your Bookmark Menu: Press 'Ctrl +…

808 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