Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Printing in an applet from javascript

Reply
Thread Tools

Printing in an applet from javascript

 
 
KenH
Guest
Posts: n/a
 
      08-16-2005
I have a charting applet that has a print method that works just fine.

My problem is I am trying to initiate the print method from a
javascript routine but it doesn't work.

I access my applet from javascript all the time (feeding data hidden in
a form to the chart), but for some reason trying to launch the printing
from javascript doesn't work. Any ideas? Do I have to set some kind of
focus?

 
Reply With Quote
 
 
 
 
VK
Guest
Posts: n/a
 
      08-16-2005

KenH wrote:
> I have a charting applet that has a print method that works just fine.
>
> My problem is I am trying to initiate the print method from a
> javascript routine but it doesn't work.
>
> I access my applet from javascript all the time (feeding data hidden in
> a form to the chart), but for some reason trying to launch the printing
> from javascript doesn't work. Any ideas? Do I have to set some kind of
> focus?


Does not PrintJob stuff require a privilege in the applet? It did
before at least (?)

Is your Java print method declared public?

 
Reply With Quote
 
 
 
 
KenH
Guest
Posts: n/a
 
      08-17-2005
I never thought it needed any kind of privilege -- don't know how to do
that to be honest. I built a separate print class because I use it for
other applets.

I have a button on my applet that initiates the print process. When I
try to start that same process from the javascript...nothing.

 
Reply With Quote
 
Martin Honnen
Guest
Posts: n/a
 
      08-17-2005


KenH wrote:

> I never thought it needed any kind of privilege -- don't know how to do
> that to be honest. I built a separate print class because I use it for
> other applets.
>
> I have a button on my applet that initiates the print process. When I
> try to start that same process from the javascript...nothing.


I am pretty sure the Java console will show more than nothing. I would
check there for any error messages.


--

Martin Honnen
http://JavaScript.FAQTs.com/
 
Reply With Quote
 
VK
Guest
Posts: n/a
 
      08-17-2005

KenH wrote:
> I never thought it needed any kind of privilege -- don't know how to do
> that to be honest. I built a separate print class because I use it for
> other applets.
>
> I have a button on my applet that initiates the print process. When I
> try to start that same process from the javascript...nothing.


Can you pull out the print dialog from the applet itself? Actually you
should go first to <comp.lang.java.help> or <comp.lang.java.security>
and ask if the PrintJob class branch requires applet privileges. I
honnestly do not remember. As well I don't remember if security
exeptions are being shown on the Java console. Any way, round up the
Java issues first, then lets us talk JavaScript

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
When Javascript call applet method, applet throw security exception. crazytazo Java 3 10-06-2008 11:12 PM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:52 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:50 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-21-2007 05:28 AM
brochure printing,online yearbook,printing,books printing,publishing elie Computer Support 0 08-18-2007 10:11 AM



Advertisments