I have jQuery load asset on my layout and I want to use CHtml::ajaxButton/ajaxSubmitButton
.
But when I'm using it with another render on runtime it's loading jQuery assets again and makes an error.
How to prevent the script from loading?
<?php echo CHtml::ajaxSubmitButton( 'Submit',
CHtml::normalizeUrl(array('site/AjaxRequest/30')),
array(
'error'=>'js:function(){
alert(\'error\');
}',
'beforeSend'=>'js:function(){
alert(\'beforeSend\');
}',
'success'=>'js:function(data){
alert(\'data from server: \'+data);
}',
'complete'=>'js:function(){
alert(\'complete\');
}',
//'update'=>'#response',
)
);
?>