You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Yu...@bet.satyam.com on 2001/09/04 15:26:28 UTC

How to open a new browser window in struts

Hi,

I am new to Struts.

I am having a form where in the user can enter the search criteria and
click the submit .
We need to  show the search results in a new window as popup.

If I use actionMapping.findForward() in the perform method of Action
class it shows the results in the same window.How can I  display the
results in the new window.????

Can anyone pull me out from this problem?????

Thanks in advance,
Yugandhar


Re: How to open a new browser window in struts

Posted by Peter Alfors <pe...@hksystems.com>.
You can set the target of the form to be a new window.  The browser will
then be responsible for
loading the resulting page into a new window.

HTH,
    Pete

Yugandhar_Reddy@bet.satyam.com wrote:

> Hi,
>
> I am new to Struts.
>
> I am having a form where in the user can enter the search criteria and
> click the submit .
> We need to  show the search results in a new window as popup.
>
> If I use actionMapping.findForward() in the perform method of Action
> class it shows the results in the same window.How can I  display the
> results in the new window.????
>
> Can anyone pull me out from this problem?????
>
> Thanks in advance,
> Yugandhar


Re: How to open a new browser window in struts

Posted by Luis Olivares <ol...@infosphere.com>.
In the form where you put your search criteria use the 'target' attribute.

Something like:
            <html:form action="/search"  target="_new">

In 'target' you are supposed to tell the form to which frame it will be
forwarded, but if you set the target to a non-existent frame, it'll open a
new window.

Hope this helps :)

Regards.

                       Luis Olivares.
           luis.olivares@infosphere.com
   --------------------------------------------------------------
  "Intelligence is the ability to avoid doing
       work, yet getting the work done"
                  --Linus Torvalds--

----- Original Message -----
From: <Yu...@bet.satyam.com>
To: <st...@jakarta.apache.org>
Sent: Tuesday, September 04, 2001 8:26 AM
Subject: How to open a new browser window in struts


> Hi,
>
> I am new to Struts.
>
> I am having a form where in the user can enter the search criteria and
> click the submit .
> We need to  show the search results in a new window as popup.
>
> If I use actionMapping.findForward() in the perform method of Action
> class it shows the results in the same window.How can I  display the
> results in the new window.????
>
> Can anyone pull me out from this problem?????
>
> Thanks in advance,
> Yugandhar