Jui Tabs Ajax Beforesend And After Send










$this->widget('zii.widgets.jui.CJuiTabs', array(

    'tabs'=>array(

        'Static tab'=>'Static content',

        'Render tab'=>'test',

        'Ajax tab'=>array(

		    'ajax'=>array('ajaxContent','id'=>10),


	),


	

    ),

    'options'=>array(

        'collapsible'=>true,

        'selected'=>0,

      

    ),

    'htmlOptions'=>array(

        'style'=>'width:500px;'

    ),

));




How to add beforeSend and afterSend function to the above ajax area

Dear Friend

I hope the following will serve the purpose.

Declare the event "beforeLoad" in options.




'options'=>array(

        'collapsible'=>true,

        'selected'=>0,

        'beforeLoad'=>'js:function(event,object){

            object.ajaxSettings.url="index.php?r=test/ajaxTab";

	    object.ajaxSettings.complete=function(jqXHR,errorcode){console.log(errorcode)};

			

			}'

      

    ),




We can access the ajax settings through object.ajaxSettings where we can make customizations.

Regards.