?
Solved

printing a webpage that contains JApplets

Posted on 2009-03-30
10
Medium Priority
?
307 Views
Last Modified: 2013-12-25
Hey experts,

So i am trying to add a print this page button to a perl CGI script, the CGI prints out HTML code with several applets called.

I need to print all the applets together and they are of type JApplet:

class Graph extends JApplet {

I have spoken to a prof of mine and she seems to think that since the print button is part of the HTML:

<input type="button" value="Print this Page" onclick="window.print()">

and not inside the JApplet then the browser should print it fine but i am finding that firefox does not do the job regardless of OS.

I use a Mac and my safari prints everything fine.

I am thinking that perhaps i am missing a function in my JApplet that the browser may need to call.

Any ideas?

Thank!

- Tristan
0
Comment
Question by:TristanTheHakSoar
[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
  • 5
  • 3
  • 2
10 Comments
 
LVL 39

Expert Comment

by:Adam314
ID: 24022939
That code works fine in my version of firefox.  Is javascript enabled?


Try this... do you get a message box saying "testing"

<input type="button" value="testing" onClick="alert('testing')">

Open in new window

0
 
LVL 92

Expert Comment

by:objects
ID: 24023959
last time I checked that was a limitation in ff, ie. applets on the page do not get printed



0
 

Author Comment

by:TristanTheHakSoar
ID: 24035174
Hey guys,

So yeah the alert command works perfectly and i tried searching google for a mention of the inability in firefox and it didn't turn up much accept for some linux Sarge problems where nothing would be sent to the printer.

I have today also spoken with a student who mentioned something about including some kind of compatibility code for firefox in the html.

- Tristan
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 92

Expert Comment

by:objects
ID: 24035226
have you tried printing any other applets from ff?
0
 
LVL 39

Expert Comment

by:Adam314
ID: 24039980
If you select print from the file menu in firefox, does it work?
0
 

Author Comment

by:TristanTheHakSoar
ID: 24090858
Hey guys, sry but my semester is coming to a close and i'm swamped in homework and studies.

Anyways, i have tried printing other websites such as Addictinggames.com with a game loaded and newgrounds.com just the home page. Neither gets java printed.

Also, no the file > print method does not work either so this seems to be a limitation of firefox as mentioned by objects.

Would anyone have an idea as to what firefox needs in order to make an applet printable?

- Tristan
0
 

Author Comment

by:TristanTheHakSoar
ID: 24196683
Hey all, so my computer's hard disk bit the biscuit but as i am done schooling for the year i now have access to my work's computers full time.
I have already completed rewriting several applets for them but i am still under pressure to get this print button enabled.
I was speaking to a kid at my University who seemed to be on drugs given his blood shot eyes and constant stuttering but he tried to tell me code i could implement to make firefox print the applets followed by a remark that he was smarter than computer scientists.
I have since made it my duty to avoid this individual when i do see him but i am trying to track down the code as we speak with no success.
Anybody have any ideas? this should be really straight forward, making applets printable in firefox.
Thanks,
- Tristan
 
0
 
LVL 92

Accepted Solution

by:
objects earned 1000 total points
ID: 24200377
I've never seen ff successfully print any applet

0
 

Author Comment

by:TristanTheHakSoar
ID: 24243826
Hey experts,

So If FF (along with anything other than Safari) is gonna be a waste of disk space, i guess i know what i'm going to do. I'm gonna try this new thing i found where i can use java to create a pdf file and send that to the printer, it'll be a load of work but i have to do it.

Thanks,
-Tristan
0
 

Author Closing Comment

by:TristanTheHakSoar
ID: 31564475
Wow man, i can't believe this, it makes me want to cry lol.

- TristanTheHakSoar
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

This article discusses how to create an extensible mechanism for linked drop downs.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses
Course of the Month13 days, 21 hours left to enroll

801 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