title: CakePHP 1.3: how to execute an action without going to its view
body: <p>I have a page via the action <code>search</code> where a user can specify some options to bring up rows of data. This process take a few seconds because there is quite a bit of back-end logic required. On the returned data, the user has the ability to add a row of data to another table via the action <code>add_data</code> for future reference. </p>
  
  <p>Note that the search result data is saved in a table in order for me to have the row readily available if the user decides to save it (the search result is a compilation of data from multiple databases). After the action <code>add_data</code>, I want to be able to maintain the <code>search</code> view with the search result instead of letting the browser go to the <code>add_data</code> view and go back to the referrer, where there will be no search result.</p>
  
  <p>Now, I know I can check for this table where I save the search result and just have that loaded on the <code>search</code> view, but I'm interested in knowing if it's possible to run  another action while keeping the current action view intact without consulting the database. As far as I know, no kind of <code>$this-&gt;redirect(...)</code> works because the search result page's URL lacks any arguments (e.g. <code>mycontroller/search</code>).</p>
  
  <p>I added a button that adds the user-desired data using the following code:</p>
  
  <pre><code>echo $this-&gt;Html-&gt;link('+', array('action' =&gt; 'add_data', $reference_id));    // + button is created
  </code></pre>
  
  <p>Is there a way to do this? Preferably using minimal Javascript.</p>