I am using Yii2 and using this jquery code to access the value of a cell(td) column. I have set the id of the column say 'room_name'
I am using this code which works fine on a form, but in grid-view(table) I am getting a blank alert.
<?php
$script = <<<EOD
alert ($('#room_name').val());
EOD;
$this->registerJs($script);
?>
Do I need to do it differently for tables, as the id is getting repeated over multiple rows.
Thanks for a suggestion.