struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Musachy Barroso" <musa...@gmail.com>
Subject Re: preInvokeJS in s:submit
Date Fri, 25 May 2007 13:12:07 GMT
In show case there are, it is quite simple (not AJAX technically, but
javascript)

<s:submit notifyTopics="/topics" ... >

<script>
dojo.event.topic.subscribe("/topics", function(data, type, event)){
   if (type == "before") {
     //do something
    //to cancel set event.cancel = true;
   }
});
</script>

On 5/25/07, Roger Varley <roger.varley@googlemail.com> wrote:
>
> On 25/05/07, Musachy Barroso <musachy@gmail.com> wrote:
> > Use "notifyTopics" instead.
> >
>
> I've been trying to do this for ages (display a confirmation dialog
> when the user is about to do something irrevokable) and it never
> occured to me to use Ajax :-(  Is there any example code anywhere?
>
> Regards
> Roger
>
> ---------------------------------------------------------------------
> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message