Do any body has any idea why a onclick event on a CJuiButton is triggering twice?
<?php
echo $this->widget('zii.widgets.jui.CJuiButton',array(
'name'=>'nuevo',
'caption' =>"Agregar",
'onclick'=> new CJavaScriptExpression("function(){agregarNuevo('local'); return false;}"),
),TRUE);
?>
here is my JScript
[html]<script>
function agregarNuevo(type){
if(type !== "local" && type !== "visitante")
return;
debugger;
//few lines of code that add an autocompleter
},
</script>[/html]
Thanks in advanced for any advice on how to figure out what the problem is.