I am loading a form (depending on the selected option of a dropDownList) with an ajaxcall (which triggers a renderPartial)
The ajaxcall looks like:
$("#dropDownList").change(function() {
var selected = $(this).val();
$.ajax({
url: "index.php?r=item/update&category="+selected,
cache: false,
success: function(html){
$("#inputs").html(html);
}
})
});
The action "update":
public function actionUpdate($category){
$model = new Item;
$this->renderPartial($category, array(
'model'=>$model,
), false, true);
}
The form will be renderd in the div "input" without any problems, but there is still no javascript available for the form. I have already used
Yii::app()->clientScript->scriptMap['jquery.js'] = false;
to prevent, that jquery will be loaded twice. But there is still no js available for my form (jquery.yiiactiveform.js).
Edit: I have checked my firebug, that jquery.yiiactiveform.js will be loaded after the ajaxcall (again?). - If I am using:
Yii::app()->clientScript->scriptMap['jquery.yiiactiveform.js'] = false;
jquery.yiiactiveform.js isnt available anymore, so it shouldnt be loaded twice?