The window.open javascript method takes an optional target which is the
named frame/window that you want to be the destination output. There are
a few built in names such as _parent, _blank, _self that serve special
purposes.

If the browser is unable to find a frame called "dontCareThatName", it
attempts to find a window called "dontCareThatName". If it is unable to
find a window with that name it will open a new window
altogether...hence "dontCareThatName" will open a new window the first
time this method is called. Any subsequent calls to window.open with a
target of "dontCareThatName" will send the output to the opened window.
To guarantee that a new window is opened every time use "_blank".

Regards,

Thad Smith

-----Original Message-----
From: Dakota Jack [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 05, 2005 6:25 PM
To: Struts Users Mailing List
Subject: Re: Popup Windows with Struts Actions

This looks cool to me as well.  What is with the
target="dontCareThatName"?  Is this necessary, and, if so, what should
"dontCareThatName" be?  Thanks,

On Apr 5, 2005 2:29 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Dakota Jack wrote:
> 
> >Anyone have some code on using JavaScript to open and close popup
> >windows with a Struts Action?  Thanks.
> >
> >Jack
> >
> >
> >
> I like very much:
> 
> <html:form action="/yourAction" ... target="dontCareThatName"
> onsubmit="window.open('',this.target,'scroolbar=no,
toolbar=no');return
> true;">
> <html:text...>
> <html:hidden>
> </html:form>
> 
> The output of yourAction will be shown in the popup, and all your form
> fields are brought the normal way to yourAction
> with no need to put them into a big query string after the url in the
> open() function.
> 
>        Wolfgang
> 
> 


-- 
"You can lead a horse to water but you cannot make it float on its
back."
~Dakota Jack~

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to