title: Embed a View using AJAX
body: <p>I have a view with one argument, and a set of exposed filters. When the user filters the view, the form is submitted using Ajax, and the filters are appended to the url using location.hash.</p>
  
  <p>My goal is to filter the view upon initial page load, if the filters are present in the location.hash.</p>
  
  <p>Currently, I'm loading the view through an Ajax callback, which works perfectly fine. But the big problem is that Ajax for the view doesn't work.</p>
  
  <p>This is the callback that loads the View.</p>
  
  <pre><code>// Load the view object.
  $view = views_get_view('taxonomy_term');
  $view-&gt;set_display('page');
  $view-&gt;set_use_ajax(TRUE);
  
  // Pass the current tid as the argument.
  $view-&gt;set_arguments(array($tid));
  // Set the current page.
  $view-&gt;set_current_page($page);
  // Set the exposed filters.
  $view-&gt;get_exposed_input();
  
  // Execute.
  return $view-&gt;execute_display();
  </code></pre>
  
  <p>When I navigate directly to that callback, everything works. But not when I load it through Ajax.</p>
  
  <p>Any ideas?</p>
  
  <p>Update:
  It seems that Drupal.behaviors.ViewsAjaxView() doesn't execute for some reason. If I execute it manually, everything works.</p>