[Logo]
Forums Register Login
Servlet generating Image into Browser's Popup Window
Hello All,
I haven't coded with Java for a while but now I'm happy to do it.
I have situation that Servlet is generating dynamically a Graphic into MemoryStream and it should be shown
in a new Popup Window of the Browser. I also have to give some properties to Popup Window show I can't use <a href's > target="_blank" attribute.
If Servlet generating a Craphic is called using a img-tag so how should I do it that Graphic comes to a new Popup Window?

Can javascript handle that or if yes how?

Scenario is following: User is selecting a wanted Image from JSP's list, selected item calls Popup Window and Servlet is generating Graphic into it.

I would be glad for some advise,

Cheers

Mic
Why not work out the problem in two steps:

1. Figure out the HTML and Javascript to create a popup window with a static image from a file.
2. with that working direct the image request to a servlet with a URL that ensures you get the right image. Remember to set the content-length and mime type in the servlet response.

Bill
when User is selecting a wanted Image from JSP's list call a java script function
inside that function give a particular name to your selected file and add that value as url parameter
like myservlet?filename="myfilename" then open new window using
window.open(myservlet?filename="myfilename");

check this link for more info on that javascript method

hope this will work for you.....
 

vijin das wrote:when User is selecting a wanted Image from JSP's list call a java script function
inside that function give a particular name to your selected file and add that value as url parameter
like myservlet?filename="myfilename" then open new window using
window.open(myservlet?filename="myfilename");

check this link for more info on that javascript method

hope this will work for you.....



Thanks a lot, this was what I was looking for,

Br
Mic

This thread has been viewed 1733 times.

All times above are in ranch (not your local) time.
The current ranch time is
Oct 22, 2018 23:31:41.