I have a form rendered in the view which action is setted to the same page /index. <form action="" name="formRegistro" id="formRegistro">
and a JQuery function which is called when the form is submitted
$('#formRegistro').submit(function() {
// Retrevies data from the form
data = $('#someInput').val()
//Execute AJAX
$.get(
'http://localhost/myproject/',
{ data },
function(data){
$('#divStatus').html(data);
}
);
//Prevent page loading
return false;
});
I'm using and if statement in the IndexController to change between normal view and post view if ($this->_request->isGet()) {
and I'd like to output a message in the #divStatus but with I don't know how to do it