Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • jQuery Ajax in cakephp

    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 0
    • 85
    Comment on it

    We can implement jquery ajax by this way

    $this->layout = 'ajax';
    

    Call above line in your function inside your controller file. by this way we can call the ajax layout.

    Need to create a ajax.ctp file which is empty layout file.

    
    
    $.get('/controller/action/'+Math.random(),{},function(data){
      $('#myresult').html(data);
    });
    

    Where data will display in the inner html of result element.

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: