title: Jquery Confirmation Dialogue - Yii framework
body: <p>I am trying to use Jquery Dialog box in place of Java script standard confirmation dialog box for my project </p>
  
  <p>I googled and found below nice Jquery confirmation dialogues</p>
  
  <p><a href="http://labs.abeautifulsite.net/archived/jquery-alerts/demo/" rel="nofollow">http://labs.abeautifulsite.net/archived/jquery-alerts/demo/</a></p>
  
  <p>I am currently using Yii framework </p>
  
  <p>I am having rows of data with delete option for each row . Clicking on the delete link asks for the confirmation and based on user input it deletes the row . </p>
  
  <p>For that I am using below Java script code. It is Working perfect and no issues </p>
  
  <pre><code>"onclick"=&gt;"if (
              !confirm('Are you sure?\\r\\nYou are going to unregister for this subject.')
                ) {     return      }
  </code></pre>
  
  <p>But now to use the above Jquery dialog I don't find a way to implement exactly like above .
  Below is the code I tried</p>
  
  <pre><code>"onclick"=&gt;"if (
              !jConfirm('Can you confirm this?', 'Confirmation Dialog', 
                   function(r) {
                                 return r ; 
                                }
                        )
                  ){    return     } "
  </code></pre>
  
  <p>But this didn't help and I even tried some other possibilities too .. But none of them helped . Could some one provide the correct way to handle the above case .</p>
  
  <p>Or if there are other dialog boxes that helps me for my case ..</p>
  
  <p>Thank You</p>
  
  <p>Regards</p>
  
  <p>Kiran</p>
  
  <p><strong>Full code where I am calling this</strong></p>
  
  <pre><code>    echo (
              CHtml::ajaxLink(
                     'Delete',
                      Yii::app()-&gt;createUrl("editcourses/removeCourse"),
                      array(
                              "type"=&gt;"POST",
                              "data"=&gt;array(
                                      "place_type"=&gt;$courses[$i]['course_type'],
                                      "place_id"=&gt;$course[$i]['course_code'],
                              ),
                              "success"=&gt;'js:function(data){  }',
                      ),
                      array(
                              "onclick"=&gt;"
                                  if (!jConfirm('Can you confirm this?', 'Confirmation Dialog', function(r) {
                                      return r ; })){return} "
                      )
              )
      );
  </code></pre>