title: Yii, Fancybox and ajax-loaded data
body: <p>I have a link that looks like </p>
  
  <pre><code>&lt;a class="fancy" href="/site/feedback"&gt;feedback&lt;/a&gt;
  </code></pre>
  
  <p>Ajax call:</p>
  
  <pre><code>$('.fancy').fancybox({
      wrapCSS: 'custom-fancy',
      padding: 0,
      type: 'ajax'
  });
  </code></pre>
  
  <p>On click fancybox load content wich controller send. </p>
  
  <pre><code>$this-&gt;renderPartial('_feedback')
  </code></pre>
  
  <p>Feedback view:</p>
  
  <pre><code>&lt;?php
  /* @var $this Controller */
  /* @var $model FeedbackForm */
  /* @var $form CActiveForm */
  
  $form = $this-&gt;beginWidget('CActiveForm', array(
      'id' =&gt; 'feedback-form',
      'enableClientValidation' =&gt; TRUE,
  )); ?&gt;
  &lt;div&gt;&lt;?= $form-&gt;textArea($model, 'feedback') ?&gt;&lt;/div&gt;
  &lt;?=$form-&gt;error($model, 'feedback')?&gt;
  &lt;? $this-&gt;widget('CCaptcha') ?&gt;
  &lt;?=$form-&gt;textField($model, 'verifyCode', array('placeholder' =&gt; 'Captcha code'))?&gt;
  &lt;div&gt;&lt;?=CHtml::submitButton('Send', array('class' =&gt; 'r button'))?&gt;&lt;/div&gt;
  &lt;? $this-&gt;endWidget() ?&gt;
  </code></pre>
  
  <p></p>
  
  <p>The problem is that there is no javascript/ajax validation on this loaded form. I think, it is because some Yii scripts did not loaded after ajax call (yiiActiveForm.js maybe, I don't know).
  What is the best solution for this situation? </p>