Commits

christiansalazar  committed 41c50b4

FIX ISSUE #1 - various widgets in the same view

  • Participants
  • Parent commits ebd785c

Comments (0)

Files changed (1)

File EFilterWidget.php

 			'onSuccess'=>new CJavaScriptExpression($this->onSuccess),
 			'onError'=>new CJavaScriptExpression($this->onError),
 		));
-		Yii::app()->getClientScript()->registerScript("efilterwidget_script"
-				,"new EFilterWidget({$options})");
+
+		$var_id = rand(1000,99999);
+		Yii::app()->getClientScript()->registerScript(
+			"efilterwidget_script_".$var_id,
+				"var efilterwidget_{$var_id} = new EFilterWidget({$options});");
 		
 	}// end run()