Does anyone know how to invoke a request from a submit
handler function?

I am using a submit tag like this:

<div id="t1">Div 1</div>
<s:url id="ajaxTest" value="SaveLineup.action" />
<img id="indicator" 
     src="images/indicator.gif" 
     alt="Loading..." 
     style="display:none"/>
<s:submit type="submit" 
          theme="ajax" 
          value="Save" 
          title="Save all changes."
          cssClass="butstylewide"
          targets="t1" 
          handler="handler"
          notifyTopics="/after"
          href="%{ajaxTest}" 
          align="left" 
          indicator="indicator"/>

My Javascript looks like this:

function handler(widget, node)
{
   alert("DEBUG in handler");
}

dojo.event.topic.subscribe("/after", function(data,
type, e)
{
   alert("Lineup saved");
});

The documentation says this:

'handler' is the name of the function that will take
care of making the AJAX request. Dojo's widget and dom
node are passed as parameters).

But I do not see any example of how to actually do
that.  I guess it is some Dojo magic but looking
through the Dojo documentation has not proved
illuminating.  (BTW, I know if I do not have handler
specified it calls the action but I need to do some
JavaScript work beforehand.)

Thanks,

Scott

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

Reply via email to