0

i have put below code

<?php
/* helpers */
use yii\helpers\Html;
use yii\helpers\URL;

use yii\grid\GridView;
/* widgets */
use yii\widgets\Pjax;
use yii\bootstrap\Modal;

Pjax::begin(['id'=>'view_member']);
    echo Html::a('view',URL::to(['view','id'=>$model->_id]),['class'=>'show']);
Pjax::end();

this code show a anchor link and after click of this link it replace a link with data return by ajax.

I don't want to replace a link with data. I need link as it is with return data.

shivani parmar
  • 314
  • 2
  • 17

1 Answers1

1

I'd either return the link with the modal HTML or target the link from the Pjax widget, linkSelector.

echo Html::a('view',URL::to(['view','id'=>$model->_id]),['id' => 'view_link', 'class'=>'show']);
Pjax::widget(['id'=>'view_member', 'linkSelector' => '#view_link']);
Alex
  • 2,102
  • 1
  • 13
  • 16