Black Holed Request Cakephp
===

On my index page I have check boxes in each row of my table.

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.

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.

Here is my index.ctp file:

    <table id="indexTable">
        <thead><tr>
            <th> <?php echo $this->Form->checkbox('select_all', array('value' => 'select_all')); ?> </th>
            <th> <?php echo $this->Paginator->sort('id', 'ID'); ?> </th>
            <th> <?php echo $this->Paginator->sort('name', 'Name'); ?> </th>
            <th>Auto Offset  </th>  <th>UTC Offset Sec  </th>  <th>In Month  </th>
            <th>In Week      </th>  <th>In Dow          </th>  <th>In Hour   </th>  <th>Out Month   </th>
            <th>Out Week     </th>  <th>Out Dow         </th>  <th>Out Hour  </th>  <th>Offset Sec  </th>
            <th>DST Ref      </th>  <th>Actions      </th>
        </tr></thead>
    
        <tbody>
    
    <?php
    foreach($localClocks as $LocalClock) { ?>
            <tr>
                <td>  <?php echo $this->Form->checkbox('LocalClocks'.$LocalClock['LocalClock']['id'], array('value' => $LocalClock['LocalClock']['id'], 'hiddenField' => false));?>  </td>
                <td>  <?php echo $LocalClock['LocalClock']['id']; ?>              </td>
                <td>  <?php echo $LocalClock['LocalClock']['name']; ?>            </td>
                <td>  <?php echo $LocalClock['LocalClock']['auto_offset']; ?>     </td>
            </tr>
    <?php } ?>
        </tbody>
    </table>
    
    </div>
    
    <!-- This <div> contains all the actions that can be performed on the Local Clocks. -->
    <div>
        <p>
    
            <span style="float: left">
                <?php echo $this->Html->link(__('Edit All Items'), array('action' => 'editAll'), array('class' => 'link'));?> &nbsp;&nbsp;
            </span>
    
            <span style="float: left">
                <?php echo $this->Html->link(__('Edit Selected Items'), array('action' => 'lceditSelected'), array('class' => 'general_dialog'));?> &nbsp;&nbsp;
            </span>
    
            <span style="float: right">
                <?php echo $this->Html->link(__('Delete Selected Items'), array('action' => 'deleteSelected'), array('class' => 'general_dialog'));?> &nbsp;&nbsp;
            </span>
    
        </p>
    </div>

I took out some unimportant stuff.  The problem is with my edit selected and delete selected functions.

Here is the javascript code that waits for their click and then builds the array to post to the controller action:

    $('.general_dialog').live('click', function()
    {
        $.ajaxSetup({ async: false });
        var selected = [];
    
        $("#[id*=LocalClocks]").each(function()
        {
            if(false != $(this).is(':checked'))
            {
                selected.push($(this).attr('id').replace('LocalClocks', ''));
            }
        });
    
        if(0 == selected.length)
        {
            var $selError = $("#selError_dialog").dialog(
            {
                autoOpen: false,
                modal: true,
            });
            $selError.dialog('open');
            $selError.text('No Local Clocks Were Selected');
        }
        else
        {
            var $selected = $("#general_dialog").dialog(
            {
                autoOpen: false,
                modal: true,
            });
    
            $.post($(this).attr('href'), { "data[Session][selected]": selected }, function(data)
            {
            });
            $selected.load($(this).attr('href'), function ()
            {
                $selected.dialog('open');
            });
        }
        return false; // This is to make sure the controller does not redirect to the actual edit page
    });

Any help on how to get it to work without getting black holed would be greatly appreciated.

Thanks in advance