title: Laravel 4 jquery Ajax Request
body: <p>I am new to Laravel 4. I have a page within which I have 3 tabs(basically big clickable divs) to load the different user information. What I would like to do is that I would like to be able to click on those tabs,make jquery ajax request,bring back a partial view and update a part of page with that partial view. I would like to able to do that for every tab. </p>
  
  <p>I got the click event firing.I also tried different code to accomplish ajax request. For some reason, nothing happens. I do not know if I am missing something in route.php. Could anyone please give me some code on how to do that? or may be some other idea? </p>
  
  <p>I did this::</p>
  
  <p>Route.php</p>
  
  <pre><code>Route::post('userInfo','UserController@showInfo');
  </code></pre>
  
  <p>jqueryAjax:</p>
  
  <pre><code>$("divtoUpdatePartialView").click(function(){
  
  $.ajax({
    type: "POST",
    url:Not Sure,
    data: { id: userId }
  }).done(function( msg ) {
    alert( msg );
  });
  
  }
  </code></pre>
  
  <p>I tried using Base Url too, but nothing happens. I have an ajax library declared on my master page. Could you please help me or give me some other ideas?</p>
  
  <p>Thank you very much for your answer. I tried that way, this is what I have...</p>
  
  <pre><code>Route.php:
  
  Route::get('user_Profile/userInfo', 'UserController@getshow');
  </code></pre>
  
  <p>The ajax:</p>
  
  <pre><code>var  userId='1';
  
  $.ajax({
      type: "POST",
      url: 'user_Profile/userInfo',
      data: { id: userId }
  }).done(function( msg ) {
      alert( "the messageis "+msg );
  });
  
  
  My userController::
  
  public function getshow()
      {
             return "No ajax";
      if (Request::ajax()) {
  
          return "yeahhhh";
      $html=View::make('user.userProfile')-&gt;nest('partial', 'user.userInfoPartial')-        &gt;with('title',$title)-&gt;render();
  
  
  }
  }
  </code></pre>
  
  <p>When I directly access the page I receive "No ajax", but when I try the ajax-way,nothing happens.Could you see what I am missing??</p>
  
  <p>Thank you again for your help..</p>