Hey folks,
I have what I hope is an easy issue to work around. I'm sure it is just my
lack of experience with ZF, but I'm learning as I go.
I have a form set up that I created with Zend_Form that I would like to
submit via ajax (jquery) to avoid a page reload. I'm using layouts if that
matters. The issue is no matter what I do I can't see to get the validation
errors back to the form. If I look in firebug I can see the entire layout
loaded, but nothing changed in the form on the screen. If you need
anything further let me know and I'll include it.
Here is my ajax:
$(document).ready(function(){
$("#frmAddUser").livequery('submit', function(eve){
eve.preventDefault();
$.post({
url: '/administration/adduser',
type: 'POST',
dataType: 'json',
data: $('#frmAddUser').serialize(),
success: function(response){
$('#error').html(response);
alert(response);
//alert('success'); // doesn't fire
},
error: function(response){
alert(response);
$('#error').html(response);
}
});
});
});