I am new to cakePHP and JQuery
I have a form with a table and each row of the table has a checkbox in
one of the cells.
THe user then select some of the checkboxes and click a button.
I then need to use javascript to only process the rows with checked
checkboxes.
This is what I have in the view:
...
...
<td><?=$form->input('chkSel.'.$index, array('type' => 'checkbox',
'div' => false, 'label'=>false)); ?></td>
...
...
<li><a class="btnWhite172" href="#" id="applyChanges">Apply Changes</
a></li>
...
...
This generates the following HTML:
...
...
<td>
<input type="hidden" name="data[chkSel][0]" id="chkSel0_" value="0" /
><input type="checkbox" name="data[chkSel][0]" value="1"
id="cchkSel0" /> </td>
..
The javascript:
if ($('#applyChanges').length > 0)
{
$('#applyChanges').live('click', function(e)
{
e.preventDefault();
var data = $('#data');
???
???
});
}
How do I access the "data[chkSel]" array?
This is probably a stupid question, but between google and my tired
brain at this hour I just cannot find the answer.
Thanks
Andre
--
Our newest site for the community: CakePHP Video Tutorials
http://tv.cakephp.org
Check out the new CakePHP Questions site http://ask.cakephp.org and help others
with their CakePHP related questions.
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php