wow... having a real issue this morning with sending replies before
i'm actually ready... guess the coffee hasn't made it down to the
fingers, yet...
sd9 wrote:
> Is this possible?
>
perhaps it is (i have no idea if there's javascript to explicitly
open a tab), but that's certainly going to be browser-dependent. you
can definitely cause a new window to be opened... for *me*, that would
cause a tab to open, since that's how i've got FF set up. someone still
using IE6, however, would be SOL, w.r.t. tabs.
> I tried this:
> <s:url action=
> <s:param name="id" value="Upload Image" /></s:url>">
>
> But it doesn't work!
>
well, as you can see, your example didn't really show up very well.
you'll want to do your actual link using a regular anchor tag, not
the s:a tag. that's because the s:a tag (at least according to
http://struts.apache.org/2.x/docs/a.html) surprisingly doesn't support
the (HTML) target= attribute, which is what you need.
so, you'd just need something like this:
<a target="_new" href="#"
onclick="window.open('//url/for/uploading', ...);">Upload Image</a>
if you needed to pass params from the form to the upload URL, then
you could use:
<s:url action="uploadAction.do" id="uploadurl">
<s:param name="param1" value="value1" />
<s:param name="param2" value="value2" />
...
</s:url>
<a target="_new" href="#" onclick="window.open('<s:property
value="#uploadurl" />', ...);">Upload Image</a>
HTH.
(anyone got an explanation why there's not target attribute for the
s:a tag? fine, maybe call it "htmlTarget", so there's less confusion
between it and the "targets" attribute, for the ajax s:a tag. still,
i'm really surprised to discover that it's missing...)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]