I have an applet that shows a picture (I need that for many reasons and can't just show the picture).
Problem is, I cannot right click on the picture and do a 'Save Picture As..'. So, I'm trying to create a button, when clicked, will pop up the 'Save As..' so that users can save the picture on their computer.
How do I do that? In short, how do I get the 'Save picture as..' functionality inside JSP/HTML code?
Ping & DNS - updated with new look and Ping home screen widget
If the applet can generate the picture the server can probably do the same.
The same parameters that are passed to the applet can be passed to a server process which returns you a "real" image. You might consider changing to such an implementation. In that case you do not have problems with applets anymore.
The other choice you have is opening up security for the applet and having it implement a popup when you right click on it which gives you the same options as another image. It is best however that you work with certificates and signing of the applet. Do not open up security for the whole VM (and thus for all applets).
Joined: May 24, 2006
I'll look into the security thing, thanks for the idea.