Hi,
I have table in my view:
$this->widget('bootstrap.widgets.TbGridView', array(
'id' => 'lista',
'type' => 'striped bordered condensed',
'dataProvider' => Miejsce::model()->mojsearch(),
'emptyText'=>'Empty!',//?
'template' => "{items}",
'columns' => array(
array(
'name' => '0',
'header' => 'col0',
),
array('name' => '1',
'header' => 'Col1'),
)));
?>
and i try open dialog when click cell in javascript:
<script>
$('td').click(function()
{
var data = "name=" + ($(this).text());
$.ajax({
cache: false,
type: 'GET',
url: "<?php echo $this->createUrl('site/viewOkno') ?>",
data: data,
success: function(data)
{
$("#contains").empty().append(data);
$('#dialog-animation').dialog( 'option','title',data).dialog("open");
}
error: function(data) {
alert('error')
alert(data);
},
});
});
In controller: SiteController my action:
public function actionViewOkno() {
$data = $_GET['name'];
print_r($data);
}
ok i see my dialog when table empty but when table contains elements i not see my dialog, how fix this problem?
Best Regards
Jarek