Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Printing in Kiosk Mode/Frames

Posted on 1998-06-25
3
Medium Priority
?
323 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 200 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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

After uninstalling Opera browser (for example ver. 10.63), your attempts to open a web page by clicking on a URL link may fail with an error message.  The error is "This operation has been canceled due to restrictions in effect on this computer. Ple…
Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
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.
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…

730 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