Yii2. Example: (.../index.php)
<?php echo Html::a('Add new', ['/rode/prod', 'id'=>$model->id ], ['onClick' => '
var modal = $(".modal");
$.get("/rode/prod?id='.$model->id.'", function(data) {
modal.html(data).modal("show");
});
return false;'
]);?>
<?php echo Html::a('Add new', ['/rode/lok', 'id'=>$model->id ], ['onClick' => '
var modal = $(".modal");
$.get("/rode/lok?id='.$model->id.'", function(data) {
modal.html(data).modal("show");
});
return false;'
]);?>
And other...
When start to run a modal window on click button, all others run. How to do, to run only once, but not all ?