title: Black Holed Request Cakephp
body: <p>On my index page I have check boxes in each row of my table.</p>
  
  <p>To edit selected items, I use javascript/jquery to grab the class of the checkboxes, build an array of the ids and then post it to the edit selected method in my controller.</p>
  
  <p>Now, this all works perfectly, but when Security in enabled in my App Controller, my post gets black holed and the array is not posted.</p>
  
  <p>Here is my index.ctp file:</p>
  
  <pre><code>&lt;table id="indexTable"&gt;
      &lt;thead&gt;&lt;tr&gt;
          &lt;th&gt; &lt;?php echo $this-&gt;Form-&gt;checkbox('select_all', array('value' =&gt; 'select_all')); ?&gt; &lt;/th&gt;
          &lt;th&gt; &lt;?php echo $this-&gt;Paginator-&gt;sort('id', 'ID'); ?&gt; &lt;/th&gt;
          &lt;th&gt; &lt;?php echo $this-&gt;Paginator-&gt;sort('name', 'Name'); ?&gt; &lt;/th&gt;
          &lt;th&gt;Auto Offset  &lt;/th&gt;  &lt;th&gt;UTC Offset Sec  &lt;/th&gt;  &lt;th&gt;In Month  &lt;/th&gt;
          &lt;th&gt;In Week      &lt;/th&gt;  &lt;th&gt;In Dow          &lt;/th&gt;  &lt;th&gt;In Hour   &lt;/th&gt;  &lt;th&gt;Out Month   &lt;/th&gt;
          &lt;th&gt;Out Week     &lt;/th&gt;  &lt;th&gt;Out Dow         &lt;/th&gt;  &lt;th&gt;Out Hour  &lt;/th&gt;  &lt;th&gt;Offset Sec  &lt;/th&gt;
          &lt;th&gt;DST Ref      &lt;/th&gt;  &lt;th&gt;Actions      &lt;/th&gt;
      &lt;/tr&gt;&lt;/thead&gt;
  
      &lt;tbody&gt;
  
  &lt;?php
  $this-&gt;Form-&gt;create('LocalClock');
  foreach($localClocks as $LocalClock) { ?&gt;
          &lt;tr&gt;
              &lt;td&gt;  &lt;?php echo $this-&gt;Form-&gt;checkbox('LocalClocks'.$LocalClock['LocalClock']['id'], array('value' =&gt; $LocalClock['LocalClock']['id'], 'hiddenField' =&gt; false));?&gt;  &lt;/td&gt;
              &lt;td&gt;  &lt;?php echo $LocalClock['LocalClock']['id']; ?&gt;              &lt;/td&gt;
              &lt;td&gt;  &lt;?php echo $LocalClock['LocalClock']['name']; ?&gt;            &lt;/td&gt;
              &lt;td&gt;  &lt;?php echo $LocalClock['LocalClock']['auto_offset']; ?&gt;     &lt;/td&gt;
          &lt;/tr&gt;
  &lt;?php } ?&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
  &lt;/div&gt;
  
  &lt;!-- This &lt;div&gt; contains all the actions that can be performed on the Local Clocks. --&gt;
  &lt;div&gt;
      &lt;p&gt;
  
          &lt;span style="float: left"&gt;
              &lt;?php echo $this-&gt;Html-&gt;link(__('Edit All Items'), array('action' =&gt; 'editAll'), array('class' =&gt; 'link'));?&gt; &amp;nbsp;&amp;nbsp;
          &lt;/span&gt;
  
          &lt;span style="float: left"&gt;
              &lt;?php echo $this-&gt;Html-&gt;link(__('Edit Selected Items'), array('action' =&gt; 'lceditSelected'), array('class' =&gt; 'general_dialog'));?&gt; &amp;nbsp;&amp;nbsp;
          &lt;/span&gt;
  
          &lt;span style="float: right"&gt;
              &lt;?php echo $this-&gt;Html-&gt;link(__('Delete Selected Items'), array('action' =&gt; 'deleteSelected'), array('class' =&gt; 'general_dialog'));?&gt; &amp;nbsp;&amp;nbsp;
          &lt;/span&gt;
      &lt;?php $this-&gt;Form-&gt;end(); ?&gt;
  
      &lt;/p&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I took out some unimportant stuff.  The problem is with my edit selected and delete selected functions.</p>
  
  <p>Here is the javascript code that waits for their click and then builds the array to post to the controller action:</p>
  
  <pre><code>$('.general_dialog').live('click', function()
  {
      $.ajaxSetup({ async: false });
  
          var $selDialog = $("#general_dialog").dialog(
          {
              autoOpen: false,
              modal: true,
          });
  
          var postInfo = $('#LocalClockIndexForm').serialize();
          $.ajax({
          url: $(this).attr('href'),
          type: "post",
          data: postInfo,
          success: function (response)
          {
              alert('success');
          },
          error: function()
          {
              alert("failed");
          }
      });
          $selDialog.load($(this).attr('href'), function ()
          {
              $selDialog.dialog('open');
          });
      return false; // Ensure the controller does not redirect to the actual edit page
  });
  </code></pre>
  
  <p>Any help on how to get it to work without getting black holed would be greatly appreciated.</p>
  
  <p>Thanks in advance</p>
  
  <p>------------------------------------------EDIT----------------------------------------------
  I added <code>$this-&gt;Form-&gt;create('LocalClock')</code> and <code>$this-&gt;Form-&gt;end()</code> to the table and I switched the $.post() to and $.ajax() call.</p>
  
  <p>If I send the serialised form, I don't get a black hole, but when I look at the data posted, it does not include any of the check box ids.</p>