Hi Tim, On Mon, May 16, 2011 at 2:23 PM, Tim Pizey <[email protected]> wrote:
> On 16 May 2011 09:14, Anne Peter wrote: > > Hi, > > > > I am very new to Velocity and I tried with few samples by writing > Servlets > > extending VelocityViewServlet and implementing the handleRequest(). This > > method displays the output in a new page. > > > > But my requirement is: > > When a button on a JSP is clicked, the template should get processed & > > merged and the output of the template should be shown in a popup window. > > (i.e: the parent window should display the same content as earlier & the > > form should be shown in a popup). > > > > I would like to know how can I achieve this. > > Make your velocity servlet produce the content of the popup. > > In your calling page: > > <a href="myPopupservlet" target="_new"> > > > This works; but opens the content of the form in a new tab/window. What I actually want is a javascript pop up that shows in-front of the browser, showing the content (for which I can set the pop up window width,height etc). I think the *href *resource should be to a javascript function which calls the velocity servlet. Is it possible to call the velocity servlet inside a javascript function and show the contents in a pop up? Thanks, Anne > > > -- > Tim Pizey > http://pizey.net/~timp >
