title: cakephp updating elements
body: <p>I have an index view which has some elements on it .</p>
  
  <p>index controller code;</p>
  
  <pre><code>    $userID = $this-&gt;Authsome-&gt;get('id');       
  $qnotes = $this-&gt;Qnote-&gt;getnotes($userID);  
  $this-&gt;set('qnotes', $qnotes)
  $this-&gt;render();
  </code></pre>
  
  <p>elements have been added to the page using </p>
  
  <p>index view code</p>
  
  <pre><code>&lt;?php echo $this-&gt;element('lsidebar'); ?&gt; 
  </code></pre>
  
  <p>now the Issue is I also Have an add controller. </p>
  
  <p>add controller code</p>
  
  <pre><code>    function add() {  
      if(!empty($this-&gt;data)) {      
          unset($this-&gt;Qnote-&gt;Step-&gt;validate['qnote_id']);
          $this-&gt;Qnote-&gt;saveAll($this-&gt;data); 
          $this-&gt;Session-&gt;setFlash('New Note Template has been added.','flash_normal');
  
  
      }       
  }
  </code></pre>
  
  <p>now what I am trying to achieve is once I add a Qnote i want the element('lsidebar') updated 
  for the new Qnote. </p>
  
  <p>I am Using the Ajax helper. found at <a href="http://www.cakephp.bee.pl/" rel="nofollow">http://www.cakephp.bee.pl/</a></p>
  
  <p>also Here the add qnote View Code :</p>
  
  <pre><code>&lt;?php echo $ajax-&gt;submit(
  'Submit', array(
      'url' =&gt; array(
          'controller'=&gt;'qnotes',
          'action'=&gt;'add')
  
  )); 
  </code></pre>
  
  <p>I know its sound like a noob question . can Somebody point me in the right direction atleast. 
  I have tried everything i could think off. I bet the solution something easy which i didnt think off</p>
  
  <p>help :)</p>