Database, Jquery, Ajax and Zend Framework. How to use all togheter?
        Posted  
        
            by rasouza
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by rasouza
        
        
        
        Published on 2010-05-14T21:14:42Z
        Indexed on 
            2010/05/14
            21:34 UTC
        
        
        Read the original article
        Hit count: 233
        
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
© Stack Overflow or respective owner