Hi there,
I have ajax submit button. After submitting the form, response from server is updating a div which is given as update parameter in ajax array.
Now what I want is to catch the response in the javascript instead of updating div. Meaning I want to call a javascript function on success or complete and want to get the response in the javascript veriable.
How I can do that ?
Plz help me out.
Thanks in advance.
Page 1 of 1
get server side response from ajax button
#2
Posted 26 March 2010 - 10:46 AM
Instead of using the 'update' parameter, set 'success' to be a function like so:
CHtml::ajaxButton($label, $url, array(
'type'=>'POST',
'success'=>'function(msg) { window.alert(msg); }',
)
);
Share this topic:
Page 1 of 1

Help












