Keep in mind however in POHTML the "target" attribute is deprecated unless
you are doing frames development (which I hope you are not ;-)).

The proper way to get a new window is to use the window.open() call from
your <a> tag.

HTH,
-Rod

-----Original Message-----
From: Dave Newton [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 30, 2007 11:26
To: Struts Users Mailing List
Subject: Re: Link: new window or new tab


--- Jason Deffenbaugh <[EMAIL PROTECTED]>
wrote:

> So this is a pretty simple question (I'm new to view
> technology)....
> 
> How do I control the target of a struts s:a tag?  I
> want to open the
> link in a new window or a new tab. 
> 
> I've tried:
> 
> <s:a href="%{surl}" targets="_blank"
> theme="ajax">text</s:a>
> 
> without having used ajax anywhere else in my app but
> this just opens in the current window.

The "targets" attribute of <s:a...> defines target
DIVs where the results of the ajax request will be
sent. [1]

If you want to open a link in a new window just use
POHTML, <a...>, creating the "href" attribute value
with <s:url...> if necessary.

d.

[1] http://struts.apache.org/2.x/docs/ajax-tags.html
(There are differences between 2.0 and 2.1, however.)


> 
> Help?
> 
> -Jason
> 
> 
> 
> 
>
---------------------------------------------------------------------
> 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]




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

Reply via email to