velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anne Peter <nnpt...@gmail.com>
Subject Re: How to display template output in a pop-up window
Date Mon, 16 May 2011 10:00:54 GMT
Hi Tim,

On Mon, May 16, 2011 at 2:23 PM, Tim Pizey <timp@paneris.org> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message