title: Yii popup confirmation
body: <p>I'm trying my best to alter the below code so that it produces a popup box with a warning and asking for confirmation.</p>
  
  <pre><code>echo CHtml::ajaxButton(Yii::t('mc', 'Wipe Server'), '', array(
          'type'=&gt;'POST', 'data'=&gt;array('ajax'=&gt;'wipe', Yii::app()-&gt;request-&gt;csrfTokenName=&gt;Yii::app()-&gt;request-&gt;csrfToken,),
          'success'=&gt;'function(e) {if (e) alert(e);}'
      ),
  </code></pre>
  
  <p>I expect adding <code>'confirm' => 'Wipe your server?'</code> to add a dialog box but I'm not having much success.</p>
  
  <p>I have this in ServerController:</p>
  
  <pre><code>        case 'wipe':
              if (Yii::app()-&gt;user-&gt;can($id, 'wipe'))
              {
                  if (!McBridge::get()-&gt;serverCmd($id, 'run:builtin:script wipe'))
                      echo McBridge::get()-&gt;lastError();
              }
              break;
  </code></pre>
  
  <p>I would be grateful if anyone can point out where I am going wrong or generally point me in the right direction.</p>
  
  <p>Thank you</p>