class Zakaz extends \yii\db\ActiveRecord
{
public function getIdSotrud()
{
return $this->hasOne(Otdel::className(), ['id_sotr' => 'id_sotrud']);
}
}
$sotrud = Zakaz::findOne($id);
$fio = $sotrud->IdSotrud->fio;
<div onclick="tabActive('#000000');">Tab name</div>
<div onclick="tabActive('#FF0000');">Tab name 2</div>
<div onclick="tabActive('#FFFF00');">Tab name 3</div>
function tabActive(color) {
$("#parentBlock").css('background', color);
}
function ajaxtest()
{
$.post({
url: 'test.html',
success: function (data) {
loadingtask(data);
}
});
}
function loadingtask(data)
{
echo "datatheader";
}
testajax ()
{
$.ajax({
url: "tasktest.php",
method: "get",
type: "json",
success: function(data){
loadingtask(data);
},
error: function () {
// уведомляете об ошибке
}
});
}