You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Julien Leonard <ju...@consulting-for.accor.com> on 2007/10/09 11:22:31 UTC

[S2] Send a request AJAX in JS

Hello all,
 
I want to make an ajax request (with a target) in a javascript function.
In fact, I want to do what this does :
<:a href="url" theme="ajax" targets="target1">Make request</s:a>
 
but in a fonction javascript.
 
Somone know how to do that with struts 2.0.9 ?
 
Julien


This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message electronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci apres "le message" ), sont confidentiels et destines exclusivement a l'usage de la  personne a laquelle ils sont adresses. Si vous avez recu ce message par erreur, merci  de le renvoyer a son emetteur et de le detruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressement autorisees de ce message, sont interdites.
********************************************************************** 


RE: [S2] Send a request AJAX in JS

Posted by Julien Leonard <ju...@consulting-for.accor.com>.
Thanks.
I will use topics, and I will wait for Struts 2.1

Julien 

-----Message d'origine-----
De : Musachy Barroso [mailto:musachy@gmail.com] 
Envoyé : jeudi 11 octobre 2007 16:10
À : Struts Users Mailing List
Objet : Re: [S2] Send a request AJAX in JS

Oh ok, let me just insert an Struts 2.1 commercial here. On 2.1 there is a
"bind" tag that can be bound to multiple events on multiple targets and will
make XHRs when those events fire.

http://struts.apache.org/2.x/docs/bind.html

on 2.0, if where you want to put the returned html is a div, then just use
the "div" tag on the "ajax" theme and use topics to trigger the request (in
the onclick). If the target is not a div, then you can use some nasty tricks
like having an "a" tag hidden and triggering the request using topics (not
100% sure if this would work), or just go out and get an ajax library that
will help you do it like Prototype, YUI, DWR, etc etc, or Dojo itself.

regards
musachy

On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
>
> No, I want to send a the request in a onclick of a <tr> ^^
>
> Julien
>
> -----Message d'origine-----
> De : Musachy Barroso [mailto:musachy@gmail.com] Envoyé : jeudi 11 
> octobre 2007 15:54 À : Struts Users Mailing List Objet : Re: [S2] Send 
> a request AJAX in JS
>
> But the tag does it for you. Do you mean that you want to do it 
> yourself (like, just for fun, it isn't any fun at all :) )?
>
> regards
> musachy
>
> On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com>
wrote:
> >
> > If fact, I don't need anymore to do this.
> > But i'm curious !
> >
> > In fact, I want to send an ajax request with the same way of Ajax 
> > Struts tag, but in javascript.
> > I want to put the result of this request in a div.
> >
> > Julien
> >
> > -----Message d'origine-----
> > De : ted.husted@gmail.com [mailto:ted.husted@gmail.com] De la part 
> > de Ted Husted Envoyé : mercredi 10 octobre 2007 19:12 À : Struts 
> > Users Mailing List Objet : Re: [S2] Send a request AJAX in JS
> >
> > You don't need to do anything special to make the request. Any 
> > standard Ajax approach will work just fine. The request can be to a 
> > servlet or other resource, or to a Struts 2 Action. If it's to a 
> > Struts 2 Action, it should return a HTML/Text result, or use the 
> > JSON
> plugin.
> >
> >  * http://struts.apache.org/2.x/docs/ajax.html
> >
> > The real question is what do you want to do with the response? 
> > Without that information, there's no good way to answer this 
> > question. When used with the Struts 2.0 Ajax theme, some of the 
> > Struts tags have some Ajax capability, but the key point is what the
tags do with the response.
> >
> > HTH, Ted
> > http://www.catb.org/~esr/faqs/smart-questions.html
> >
> >
> > On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com>
> wrote:
> > > Hello all,
> > >
> > > I want to make an ajax request (with a target) in a javascript
function.
> > > In fact, I want to do what this does :
> > > <:a href="url" theme="ajax" targets="target1">Make request</s:a>
> > >
> > > but in a fonction javascript.
> > >
> > > Somone know how to do that with struts 2.0.9 ?
> > >
> > > Julien
> > >
> > >
> > > This e-mail, any attachments and the information contained therein 
> > > ("this
> > message") are confidential and intended solely for the use of the 
> > addressee(s). If you have received this message in error please send 
> > it back to the sender and delete it. Unauthorized publication, use, 
> > dissemination or disclosure of this message, either in whole or in 
> > part is strictly prohibited.
> > > ******************************************************************
> > > **
> > > ** Ce message electronique et tous les fichiers joints ainsi que 
> > > les
> > informations contenues dans ce message ( ci apres "le message" ), 
> > sont confidentiels et destines exclusivement a l'usage de la  
> > personne a laquelle ils sont adresses. Si vous avez recu ce message 
> > par erreur, merci  de le renvoyer a son emetteur et de le detruire. 
> > Toutes diffusion, publication, totale ou partielle ou divulgation 
> > sous quelque forme que se soit non expressement autorisees de ce 
> > message, sont
> interdites.
> > > ******************************************************************
> > > **
> > > **
> > >
> > >
> >
> >
> > --
> > HTH, Ted <http://www.husted.com/ted/blog/>
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> > --------------------------------------------------------------------
> > - To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Send a request AJAX in JS

Posted by Musachy Barroso <mu...@gmail.com>.
Oh ok, let me just insert an Struts 2.1 commercial here. On 2.1 there
is a "bind" tag that can be bound to multiple events on multiple
targets and will make XHRs when those events fire.

http://struts.apache.org/2.x/docs/bind.html

on 2.0, if where you want to put the returned html is a div, then just
use the "div" tag on the "ajax" theme and use topics to trigger the
request (in the onclick). If the target is not a div, then you can use
some nasty tricks like having an "a" tag hidden and triggering the
request using topics (not 100% sure if this would work), or just go
out and get an ajax library that will help you do it like Prototype,
YUI, DWR, etc etc, or Dojo itself.

regards
musachy

On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
>
> No, I want to send a the request in a onclick of a <tr> ^^
>
> Julien
>
> -----Message d'origine-----
> De : Musachy Barroso [mailto:musachy@gmail.com]
> Envoyé : jeudi 11 octobre 2007 15:54
> À : Struts Users Mailing List
> Objet : Re: [S2] Send a request AJAX in JS
>
> But the tag does it for you. Do you mean that you want to do it yourself
> (like, just for fun, it isn't any fun at all :) )?
>
> regards
> musachy
>
> On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
> >
> > If fact, I don't need anymore to do this.
> > But i'm curious !
> >
> > In fact, I want to send an ajax request with the same way of Ajax
> > Struts tag, but in javascript.
> > I want to put the result of this request in a div.
> >
> > Julien
> >
> > -----Message d'origine-----
> > De : ted.husted@gmail.com [mailto:ted.husted@gmail.com] De la part de
> > Ted Husted Envoyé : mercredi 10 octobre 2007 19:12 À : Struts Users
> > Mailing List Objet : Re: [S2] Send a request AJAX in JS
> >
> > You don't need to do anything special to make the request. Any
> > standard Ajax approach will work just fine. The request can be to a
> > servlet or other resource, or to a Struts 2 Action. If it's to a
> > Struts 2 Action, it should return a HTML/Text result, or use the JSON
> plugin.
> >
> >  * http://struts.apache.org/2.x/docs/ajax.html
> >
> > The real question is what do you want to do with the response? Without
> > that information, there's no good way to answer this question. When
> > used with the Struts 2.0 Ajax theme, some of the Struts tags have some
> > Ajax capability, but the key point is what the tags do with the response.
> >
> > HTH, Ted
> > http://www.catb.org/~esr/faqs/smart-questions.html
> >
> >
> > On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com>
> wrote:
> > > Hello all,
> > >
> > > I want to make an ajax request (with a target) in a javascript function.
> > > In fact, I want to do what this does :
> > > <:a href="url" theme="ajax" targets="target1">Make request</s:a>
> > >
> > > but in a fonction javascript.
> > >
> > > Somone know how to do that with struts 2.0.9 ?
> > >
> > > Julien
> > >
> > >
> > > This e-mail, any attachments and the information contained therein
> > > ("this
> > message") are confidential and intended solely for the use of the
> > addressee(s). If you have received this message in error please send
> > it back to the sender and delete it. Unauthorized publication, use,
> > dissemination or disclosure of this message, either in whole or in
> > part is strictly prohibited.
> > > ********************************************************************
> > > ** Ce message electronique et tous les fichiers joints ainsi que
> > > les
> > informations contenues dans ce message ( ci apres "le message" ), sont
> > confidentiels et destines exclusivement a l'usage de la  personne a
> > laquelle ils sont adresses. Si vous avez recu ce message par erreur,
> > merci  de le renvoyer a son emetteur et de le detruire. Toutes
> > diffusion, publication, totale ou partielle ou divulgation sous
> > quelque forme que se soit non expressement autorisees de ce message, sont
> interdites.
> > > ********************************************************************
> > > **
> > >
> > >
> >
> >
> > --
> > HTH, Ted <http://www.husted.com/ted/blog/>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> --
> "Hey you! Would you help me to carry the stone?" Pink Floyd
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [S2] Send a request AJAX in JS

Posted by Julien Leonard <ju...@consulting-for.accor.com>.
No, I want to send a the request in a onclick of a <tr> ^^

Julien

-----Message d'origine-----
De : Musachy Barroso [mailto:musachy@gmail.com] 
Envoyé : jeudi 11 octobre 2007 15:54
À : Struts Users Mailing List
Objet : Re: [S2] Send a request AJAX in JS

But the tag does it for you. Do you mean that you want to do it yourself
(like, just for fun, it isn't any fun at all :) )?

regards
musachy

On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
>
> If fact, I don't need anymore to do this.
> But i'm curious !
>
> In fact, I want to send an ajax request with the same way of Ajax 
> Struts tag, but in javascript.
> I want to put the result of this request in a div.
>
> Julien
>
> -----Message d'origine-----
> De : ted.husted@gmail.com [mailto:ted.husted@gmail.com] De la part de 
> Ted Husted Envoyé : mercredi 10 octobre 2007 19:12 À : Struts Users 
> Mailing List Objet : Re: [S2] Send a request AJAX in JS
>
> You don't need to do anything special to make the request. Any 
> standard Ajax approach will work just fine. The request can be to a 
> servlet or other resource, or to a Struts 2 Action. If it's to a 
> Struts 2 Action, it should return a HTML/Text result, or use the JSON
plugin.
>
>  * http://struts.apache.org/2.x/docs/ajax.html
>
> The real question is what do you want to do with the response? Without 
> that information, there's no good way to answer this question. When 
> used with the Struts 2.0 Ajax theme, some of the Struts tags have some 
> Ajax capability, but the key point is what the tags do with the response.
>
> HTH, Ted
> http://www.catb.org/~esr/faqs/smart-questions.html
>
>
> On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com>
wrote:
> > Hello all,
> >
> > I want to make an ajax request (with a target) in a javascript function.
> > In fact, I want to do what this does :
> > <:a href="url" theme="ajax" targets="target1">Make request</s:a>
> >
> > but in a fonction javascript.
> >
> > Somone know how to do that with struts 2.0.9 ?
> >
> > Julien
> >
> >
> > This e-mail, any attachments and the information contained therein 
> > ("this
> message") are confidential and intended solely for the use of the 
> addressee(s). If you have received this message in error please send 
> it back to the sender and delete it. Unauthorized publication, use, 
> dissemination or disclosure of this message, either in whole or in 
> part is strictly prohibited.
> > ********************************************************************
> > ** Ce message electronique et tous les fichiers joints ainsi que  
> > les
> informations contenues dans ce message ( ci apres "le message" ), sont 
> confidentiels et destines exclusivement a l'usage de la  personne a 
> laquelle ils sont adresses. Si vous avez recu ce message par erreur, 
> merci  de le renvoyer a son emetteur et de le detruire. Toutes 
> diffusion, publication, totale ou partielle ou divulgation sous 
> quelque forme que se soit non expressement autorisees de ce message, sont
interdites.
> > ********************************************************************
> > **
> >
> >
>
>
> --
> HTH, Ted <http://www.husted.com/ted/blog/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


--
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Send a request AJAX in JS

Posted by Musachy Barroso <mu...@gmail.com>.
But the tag does it for you. Do you mean that you want to do it
yourself (like, just for fun, it isn't any fun at all :) )?

regards
musachy

On 10/11/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
>
> If fact, I don't need anymore to do this.
> But i'm curious !
>
> In fact, I want to send an ajax request with the same way of Ajax Struts
> tag, but in javascript.
> I want to put the result of this request in a div.
>
> Julien
>
> -----Message d'origine-----
> De : ted.husted@gmail.com [mailto:ted.husted@gmail.com] De la part de Ted
> Husted
> Envoyé : mercredi 10 octobre 2007 19:12
> À : Struts Users Mailing List
> Objet : Re: [S2] Send a request AJAX in JS
>
> You don't need to do anything special to make the request. Any standard Ajax
> approach will work just fine. The request can be to a servlet or other
> resource, or to a Struts 2 Action. If it's to a Struts 2 Action, it should
> return a HTML/Text result, or use the JSON plugin.
>
>  * http://struts.apache.org/2.x/docs/ajax.html
>
> The real question is what do you want to do with the response? Without that
> information, there's no good way to answer this question. When used with the
> Struts 2.0 Ajax theme, some of the Struts tags have some Ajax capability,
> but the key point is what the tags do with the response.
>
> HTH, Ted
> http://www.catb.org/~esr/faqs/smart-questions.html
>
>
> On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
> > Hello all,
> >
> > I want to make an ajax request (with a target) in a javascript function.
> > In fact, I want to do what this does :
> > <:a href="url" theme="ajax" targets="target1">Make request</s:a>
> >
> > but in a fonction javascript.
> >
> > Somone know how to do that with struts 2.0.9 ?
> >
> > Julien
> >
> >
> > This e-mail, any attachments and the information contained therein ("this
> message") are confidential and intended solely for the use of the
> addressee(s). If you have received this message in error please send it back
> to the sender and delete it. Unauthorized publication, use, dissemination or
> disclosure of this message, either in whole or in part is strictly
> prohibited.
> > **********************************************************************
> > Ce message electronique et tous les fichiers joints ainsi que  les
> informations contenues dans ce message ( ci apres "le message" ), sont
> confidentiels et destines exclusivement a l'usage de la  personne a laquelle
> ils sont adresses. Si vous avez recu ce message par erreur, merci  de le
> renvoyer a son emetteur et de le detruire. Toutes diffusion, publication,
> totale ou partielle ou divulgation sous quelque forme que se soit non
> expressement autorisees de ce message, sont interdites.
> > **********************************************************************
> >
> >
>
>
> --
> HTH, Ted <http://www.husted.com/ted/blog/>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
"Hey you! Would you help me to carry the stone?" Pink Floyd

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [S2] Send a request AJAX in JS

Posted by Julien Leonard <ju...@consulting-for.accor.com>.
If fact, I don't need anymore to do this.
But i'm curious !

In fact, I want to send an ajax request with the same way of Ajax Struts
tag, but in javascript. 
I want to put the result of this request in a div.

Julien

-----Message d'origine-----
De : ted.husted@gmail.com [mailto:ted.husted@gmail.com] De la part de Ted
Husted
Envoyé : mercredi 10 octobre 2007 19:12
À : Struts Users Mailing List
Objet : Re: [S2] Send a request AJAX in JS

You don't need to do anything special to make the request. Any standard Ajax
approach will work just fine. The request can be to a servlet or other
resource, or to a Struts 2 Action. If it's to a Struts 2 Action, it should
return a HTML/Text result, or use the JSON plugin.

 * http://struts.apache.org/2.x/docs/ajax.html

The real question is what do you want to do with the response? Without that
information, there's no good way to answer this question. When used with the
Struts 2.0 Ajax theme, some of the Struts tags have some Ajax capability,
but the key point is what the tags do with the response.

HTH, Ted
http://www.catb.org/~esr/faqs/smart-questions.html


On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
> Hello all,
>
> I want to make an ajax request (with a target) in a javascript function.
> In fact, I want to do what this does :
> <:a href="url" theme="ajax" targets="target1">Make request</s:a>
>
> but in a fonction javascript.
>
> Somone know how to do that with struts 2.0.9 ?
>
> Julien
>
>
> This e-mail, any attachments and the information contained therein ("this
message") are confidential and intended solely for the use of the
addressee(s). If you have received this message in error please send it back
to the sender and delete it. Unauthorized publication, use, dissemination or
disclosure of this message, either in whole or in part is strictly
prohibited.
> **********************************************************************
> Ce message electronique et tous les fichiers joints ainsi que  les
informations contenues dans ce message ( ci apres "le message" ), sont
confidentiels et destines exclusivement a l'usage de la  personne a laquelle
ils sont adresses. Si vous avez recu ce message par erreur, merci  de le
renvoyer a son emetteur et de le detruire. Toutes diffusion, publication,
totale ou partielle ou divulgation sous quelque forme que se soit non
expressement autorisees de ce message, sont interdites.
> **********************************************************************
>
>


--
HTH, Ted <http://www.husted.com/ted/blog/>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Send a request AJAX in JS

Posted by Ted Husted <hu...@apache.org>.
You don't need to do anything special to make the request. Any
standard Ajax approach will work just fine. The request can be to a
servlet or other resource, or to a Struts 2 Action. If it's to a
Struts 2 Action, it should return a HTML/Text result, or use the JSON
plugin.

 * http://struts.apache.org/2.x/docs/ajax.html

The real question is what do you want to do with the response? Without
that information, there's no good way to answer this question. When
used with the Struts 2.0 Ajax theme, some of the Struts tags have some
Ajax capability, but the key point is what the tags do with the
response.

HTH, Ted
http://www.catb.org/~esr/faqs/smart-questions.html


On 10/9/07, Julien Leonard <ju...@consulting-for.accor.com> wrote:
> Hello all,
>
> I want to make an ajax request (with a target) in a javascript function.
> In fact, I want to do what this does :
> <:a href="url" theme="ajax" targets="target1">Make request</s:a>
>
> but in a fonction javascript.
>
> Somone know how to do that with struts 2.0.9 ?
>
> Julien
>
>
> This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
> **********************************************************************
> Ce message electronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci apres "le message" ), sont confidentiels et destines exclusivement a l'usage de la  personne a laquelle ils sont adresses. Si vous avez recu ce message par erreur, merci  de le renvoyer a son emetteur et de le detruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressement autorisees de ce message, sont interdites.
> **********************************************************************
>
>


-- 
HTH, Ted <http://www.husted.com/ted/blog/>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Global exceptions problem

Posted by dm...@ubs.com.
Hi, Group.

I see some strange behavior in handling global exceptions in RAD 7.0.
I load my InitSrvlet through WEB.xml to perform an app initialization
from property files. Once this servlet is loaded, it effects struts
global exception handling. Defined global exceptions are not caught by
struts. If I would disable load of the servlet, global exceptions are
handled normally. Please let me know what could be a cause for this
behavior.

Your help would be appreciated.

Dmitry.

























Please do not transmit orders or instructions regarding a UBS account by e-mail. The information provided in this e-mail or any attachments is not an official transaction confirmation or account statement. For your protection, do not include account numbers, Social Security numbers, credit card numbers, passwords or other non-public information in your e-mail. Because the information contained in this message may be privileged, confidential, proprietary or otherwise protected from disclosure, please notify us immediately by replying to this message and deleting it from your computer if you have received this communication in error. Thank you.



UBS Financial Services Inc.

UBS International Inc.

UBS Financial Services Incorporated of Puerto Rico

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [S2] Send a request AJAX in JS

Posted by Dave Newton <ne...@yahoo.com>.
*lol* No, I guess that wouldn't help, huh :/ I guess I
was thinking of either a form, or Rails.

You could always cheat and click() a hidden link ;)

If you search the archives this question may have been
discussed once before, but it might be for forms. I
don't have access to my dev box at the moment;
hopefully someone else will be a bit more helpful!

d.

--- Julien Leonard
<ju...@consulting-for.accor.com> wrote:

> In fact, I've already looked the generated source.
> 
> And s:a generate this : <a
> dojoType="struts:BindAnchor" href="url"
> targets="theTarget"    showError="true">...</a> 
> 
> I can't see how to use it to make a request in
> Javascript.
> 
> Julien
> 
> -----Message d'origine-----
> De : Dave Newton [mailto:newton.dave@yahoo.com] 
> Envoyé : mardi 9 octobre 2007 15:44
> À : Struts Users Mailing List
> Objet : Re: [S2] Send a request AJAX in JS
> 
> --- Julien Leonard wrote:
> > I want to make an ajax request (with a target) in
> a javascript 
> > function. In fact, I want to do what this
> 
> > does: <:a href="url" theme="ajax"
> targets="target1">Make request</s:a>
> >  
> > but in a fonction javascript.
> >  
> > Somone know how to do that with struts 2.0.9 ?
> 
> If you look at the generated source for the <s:a...>
> tag you'll see exactly
> what it's doing.
> 
> d.
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 
> 
> This e-mail, any attachments and the information
> contained therein ("this message") are confidential
> and intended solely for the use of the addressee(s).
> If you have received this message in error please
> send it back to the sender and delete it.
> Unauthorized publication, use, dissemination or
> disclosure of this message, either in whole or in
> part is strictly prohibited.
>
**********************************************************************
> 
> Ce message électronique et tous les fichiers joints
> ainsi que  les informations contenues dans ce
> message ( ci après "le message" ), sont
> confidentiels et destinés exclusivement à l'usage de
> la  personne à laquelle ils sont adressés. Si vous
> avez reçu ce message par erreur, merci  de le
> renvoyer à son émetteur et de le détruire. Toutes
> diffusion, publication, totale ou partielle ou
> divulgation sous quelque forme que se soit non
> expressément autorisées de ce message, sont
> interdites.
>
**********************************************************************
> 
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


RE: [S2] Send a request AJAX in JS

Posted by Julien Leonard <ju...@consulting-for.accor.com>.
In fact, I've already looked the generated source.

And s:a generate this : <a dojoType="struts:BindAnchor" href="url"
targets="theTarget"    showError="true">...</a> 

I can't see how to use it to make a request in Javascript.

Julien

-----Message d'origine-----
De : Dave Newton [mailto:newton.dave@yahoo.com] 
Envoyé : mardi 9 octobre 2007 15:44
À : Struts Users Mailing List
Objet : Re: [S2] Send a request AJAX in JS

--- Julien Leonard wrote:
> I want to make an ajax request (with a target) in a javascript 
> function. In fact, I want to do what this

> does: <:a href="url" theme="ajax"
targets="target1">Make request</s:a>
>  
> but in a fonction javascript.
>  
> Somone know how to do that with struts 2.0.9 ?

If you look at the generated source for the <s:a...> tag you'll see exactly
what it's doing.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org



This e-mail, any attachments and the information contained therein ("this message") are confidential and intended solely for the use of the addressee(s). If you have received this message in error please send it back to the sender and delete it. Unauthorized publication, use, dissemination or disclosure of this message, either in whole or in part is strictly prohibited.
********************************************************************** 
Ce message électronique et tous les fichiers joints ainsi que  les informations contenues dans ce message ( ci après "le message" ), sont confidentiels et destinés exclusivement à l'usage de la  personne à laquelle ils sont adressés. Si vous avez reçu ce message par erreur, merci  de le renvoyer à son émetteur et de le détruire. Toutes diffusion, publication, totale ou partielle ou divulgation sous quelque forme que se soit non expressément autorisées de ce message, sont interdites.
********************************************************************** 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: [S2] Send a request AJAX in JS

Posted by Dave Newton <ne...@yahoo.com>.
--- Julien Leonard wrote:
> I want to make an ajax request (with a target) in a
> javascript function. In fact, I want to do what this

> does: <:a href="url" theme="ajax"
targets="target1">Make request</s:a>
>  
> but in a fonction javascript.
>  
> Somone know how to do that with struts 2.0.9 ?

If you look at the generated source for the <s:a...>
tag you'll see exactly what it's doing.

d.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org