Update a part of content using AJAX when select a GridView row

Comparing #4 with #5

Revision #5 was created by Kostas Apazidis (KonApaz) Kostas Apazidis (KonApaz) on Dec 3, 2013, 3:35:27 PM.

-

Content

[...]
var keyId = $.fn.yiiGridView.getSelection(grid_id);
keyId = keyId[0]; //above function returns an array with single item, so get the value of the first item

$.ajax({
url: '<?php echo $this->createUrl('PartUpdate'); ?>',
data: {
<?php id: keyId ?>},
type: 'GET',
success: function(data) {
$('#part-block').html(data);
}
});
[...]