With notify topics you can handle before and after topics separately.
Suppose submitForm is the name of the topic that you are publishing then you
can do something like this.
<script type="text/javascript">
dojo.event.topic.subscribe("/submitForm", function(data, type, e){
if (type=="before"){
//do something before the form is submitted
}
if (type=="load")
{
//do something after the form is submitted
}
});
</script>
Manu
-----Original Message-----
From: Eduardo Yáñez Parareda [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 18, 2007 3:32 PM
To: [email protected]
Subject: Callback after AJAX call
Hello, I'm new to Struts 2.
In a project we're using version 2.0.9, and have some questions about AJAX
calls.
How could I call a javascript function after making an AJAX call?
I know that in future 2.1 version there is a afterNotifyTopics parameter
that I could use
to do that, but how could I do it on 2.0.9?
We tried notifyTopics, but this one executes the javascript code before and
after calling.
--
Eduardo Yáñez Parareda
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]