Hello
im trying to create a helper to avoid writing lots of codes
i cant get this to work
class M {
public static function ajax($divId,$action,$data){
$varJs=CHtml::ajax(
array(
'url'=>array($action),
'update'=>'#'.$divId,
'data'=>http_build_query($data).'js:jQuery(this).serialize()', // 'data'=>'js:jQuery(this).serialize()', // only send element name, not whole form
'type'=>'POST' ,
'beforeSend' => 'function(){jQuery("#'.$divId.'").ajaxLoader();}',
'complete' => 'function(){jQuery("#'.$divId.'").ajaxLoaderRemove();}',
));
return $varJs;
}
}
always having the string " js:jQuery(this).serialize()" comming out on the received data!!